3 # $NetBSD: ipsec,v 1.7 2002/03/22 04:33:58 thorpej Exp $
8 # REQUIRE: root mountcritlocal
9 # BEFORE: DAEMON mountcritremote
12 # it does not really require beforenetlkm.
18 start_precmd="ipsec_prestart"
19 start_cmd="ipsec_start"
20 stop_precmd="test -f /etc/ipsec.conf"
22 reload_cmd="ipsec_reload"
23 extra_commands="reload"
24 ipsec_program="/sbin/setkey"
25 # ipsec_file is set by rc.conf
29 if [ ! -f "$ipsec_file" ]; then
30 warn "$ipsec_file not readable; ipsec start aborted."
32 # If booting directly to multiuser, send SIGTERM to
33 # the parent (/etc/rc) to abort the boot
35 if [ "$autoboot" = yes ]; then
36 echo "ERROR: ABORTING BOOT (sending SIGTERM to parent)!"
47 echo "Installing ipsec manual keys/policies."
48 ${ipsec_program} -f $ipsec_file
53 echo "Clearing ipsec manual keys/policies."
55 # still not 100% sure if we would like to do this.
56 # it is very questionable to do this during shutdown session, since
57 # it can hang any of remaining IPv4/v6 session.
65 echo "Reloading ipsec manual keys/policies."
68 ${ipsec_program} -f "$ipsec_file"