Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jul 2002 00:22:46 +0900
From:      Hajimu UMEMOTO <ume@mahoroba.org>
To:        gordon@FreeBSD.org
Cc:        current@FreeBSD.org
Subject:   location of setkey in /etc/rc.d/ipsec
Message-ID:  <yge1y9nlvw9.wl@lyrics.mahoroba.org>

next in thread | raw e-mail | index | archive | help
Hi,

I found that setup of IPsec doesn't work correctly if you are using
/etc/rc.d/.  While NetBSD has setkey in /sbin, FreeBSD has it in
/usr/sbin.  However, the location is hardcoded in /etc/rc.d/ipsec.
Here is a patch.
It may be a time to consider to move setkey into /sbin as NetBSD did.

Sincerely,

--- etc/rc.d/ipsec.orig	Fri Jun 14 17:30:58 2002
+++ etc/rc.d/ipsec	Mon Jul 29 00:03:28 2002
@@ -45,7 +45,7 @@
 ipsec_start()
 {
 	echo "Installing ipsec manual keys/policies."
-	/sbin/setkey -f $ipsec_file
+	setkey -f $ipsec_file
 }
 
 ipsec_stop()
@@ -56,16 +56,16 @@
 	# it is very questionable to do this during shutdown session, since
 	# it can hang any of remaining IPv4/v6 session.
 	#
-	/sbin/setkey -F
-	/sbin/setkey -FP
+	setkey -F
+	setkey -FP
 }
 
 ipsec_reload()
 {
 	echo "Reloading ipsec manual keys/policies."
-	/sbin/setkey -F
-	/sbin/setkey -FP
-	/sbin/setkey -f "$ipsec_file"
+	setkey -F
+	setkey -FP
+	setkey -f "$ipsec_file"
 }
 
 load_rc_config $name


--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org  ume@bisd.hitachi.co.jp  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?yge1y9nlvw9.wl>