summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/ipsec
diff options
context:
space:
mode:
authorgordon <gordon@FreeBSD.org>2002-06-13 22:14:37 +0000
committergordon <gordon@FreeBSD.org>2002-06-13 22:14:37 +0000
commit9c5433cb225f7a4e56e87623ea2e4011179553a5 (patch)
tree3168589e209abd888b033397e3c46dee6131a116 /etc/rc.d/ipsec
parent50d99cdfecd92f5323a18aa791a5b1cb9d8b7191 (diff)
downloadFreeBSD-src-9c5433cb225f7a4e56e87623ea2e4011179553a5.zip
FreeBSD-src-9c5433cb225f7a4e56e87623ea2e4011179553a5.tar.gz
Merge in all the changes that Mike Makonnen has been maintaining for a
while. This is only the script pieces, the glue for the build comes next. Submitted by: Mike Makonnen <makonnen@pacbell.net> Reviewed by: silence on -current and -hackers Prodded by: rwatson
Diffstat (limited to 'etc/rc.d/ipsec')
-rwxr-xr-xetc/rc.d/ipsec17
1 files changed, 11 insertions, 6 deletions
diff --git a/etc/rc.d/ipsec b/etc/rc.d/ipsec
index 01313f9..609b6a6 100755
--- a/etc/rc.d/ipsec
+++ b/etc/rc.d/ipsec
@@ -1,17 +1,22 @@
#!/bin/sh
#
-# $NetBSD: ipsec,v 1.5 2000/07/21 01:16:07 lukem Exp $
+# $NetBSD: ipsec,v 1.7 2002/03/22 04:33:58 thorpej Exp $
+# $FreeBSD$
#
# PROVIDE: ipsec
# REQUIRE: root beforenetlkm mountcritlocal tty
+# BEFORE: DAEMON
+# KEYWORD: FreeBSD NetBSD
# it does not really require beforenetlkm.
. /etc/rc.subr
name="ipsec"
-rcvar=$name
+rcvar=`set_rcvar`
+# This will be overiden from rc.conf on FreeBSD.
+ipsec_file="/etc/ipsec.conf"
start_precmd="ipsec_prestart"
start_cmd="ipsec_start"
stop_precmd="test -f /etc/ipsec.conf"
@@ -21,8 +26,8 @@ extra_commands="reload"
ipsec_prestart()
{
- if [ ! -f /etc/ipsec.conf ]; then
- warn "/etc/ipsec.conf not readable; ipsec start aborted."
+ if [ ! -f "$ipsec_file" ]; then
+ warn "$ipsec_file not readable; ipsec start aborted."
#
# If booting directly to multiuser, send SIGTERM to
# the parent (/etc/rc) to abort the boot
@@ -40,7 +45,7 @@ ipsec_prestart()
ipsec_start()
{
echo "Installing ipsec manual keys/policies."
- /sbin/setkey -f /etc/ipsec.conf
+ /sbin/setkey -f $ipsec_file
}
ipsec_stop()
@@ -60,7 +65,7 @@ ipsec_reload()
echo "Reloading ipsec manual keys/policies."
/sbin/setkey -F
/sbin/setkey -FP
- /sbin/setkey -f /etc/ipsec.conf
+ /sbin/setkey -f "$ipsec_file"
}
load_rc_config $name
OpenPOWER on IntegriCloud