ports/117128: ipsec-tools racoon.sh fails with /var on mfs

John Hein jhein at timing.com
Fri Oct 12 00:00:11 UTC 2007


>Number:         117128
>Category:       ports
>Synopsis:       ipsec-tools racoon.sh fails with /var on mfs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 12 00:00:10 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     John Hein
>Release:        FreeBSD 6.2-STABLE-20070417 i386
>Organization:
Symmetricom
>Environment:
System: FreeBSD bugs.timing.com 6.2-STABLE FreeBSD 6.2-STABLE #0: Wed Apr 18 13:56:25 MDT 2007 jhein at bugs.timing.com:/usr/obj/usr/src/sys/BUGS i386

	Applies to all supported versions of FreeBSD.

>Description:

racoon won't start because ...

WARNING: /var/db/racoon is not a directory

If /var/db/racoon is missing, racoon fails to start since /var/db/racoon
is a "required_dir".  Fine...

If /var is an mfs (varmfs=YES or varmfs=AUTO when /var/run, etc. don't exist
- see /etc/rc.d/var), /var/db/racoon does not get created on boot & /var
population.  /var/db/racoon is not created my mtree using BSD.var.dist (as
it shouldn't be).  So even if you create /var/db/racoon manually, every
time you reboot, it will be gone.

I see no good way to create that directory early before the
required_dirs check in rc.subr.

/var/db/racoon holds a socket, by the way.


>How-To-Repeat:

Install security/ipsec-tools.
Run "env racoon_enable=YES /usr/local/etc/rc.d/racoon start".
tail /var/log/messages
... to see the "WARNING" and observe that racoon is not running.

Workaround: 'racoon forcestart', but that requires manual
intervention.

>Fix:

Maintainer was notified on May 25, but there was no response.  I had
forgotten about my local patch until now...

Have the racoon startup script [optionally] create its required dirs...

Index: files/racoon.sh.in
===================================================================
RCS file: /base/FreeBSD-CVS/ports/security/ipsec-tools/files/racoon.sh.in,v
retrieving revision 1.4
diff -u -p -r1.4 racoon.sh.in
--- files/racoon.sh.in  3 May 2006 16:01:58 -0000       1.4
+++ files/racoon.sh.in  25 May 2007 23:23:33 -0000
@@ -24,6 +24,8 @@ prefix=%%PREFIX%%
 [ -z "$racoon_enable" ] && racoon_enable="NO"  # Disable by default
 #racoon_program="${prefix}/sbin/racoon"                # Location of racoon
 #racoon_flags=""                               # Flags to racoon program
+racoon_create_dirs=NO                          # Create $required_dirs (for
+					#  /var mfs)?
 
 . %%RC_SUBR%%
 
@@ -43,4 +45,7 @@ racoon_cleanup() {
 }
 
 load_rc_config $name
+if [ "$1" = start ] && checkyesno "${name}_create_dirs"; then
+	/bin/mkdir -p $required_dirs
+fi
 run_rc_command "$1"

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list