3 # $NetBSD: ipsec,v 1.7 2002/03/22 04:33:58 thorpej Exp $
4 # $FreeBSD: src/etc/rc.d/ipsec,v 1.5 2003/02/16 20:46:08 mtm Exp $
5 # $DragonFly: src/etc/rc.d/ipsec,v 1.4 2005/04/22 08:30:25 joerg Exp $
9 # REQUIRE: root mountcritlocal tty
17 start_precmd="ipsec_prestart"
18 start_cmd="ipsec_start"
19 stop_precmd="test -f /etc/ipsec.conf"
21 reload_cmd="ipsec_reload"
22 extra_commands="reload"
23 ipsec_program="/usr/sbin/setkey"
24 # ipsec_file is set by rc.conf
28 if [ ! -f "$ipsec_file" ]; then
29 warn "$ipsec_file not readable; ipsec start aborted."
31 # If booting directly to multiuser, send SIGTERM to
32 # the parent (/etc/rc) to abort the boot
34 if [ "$autoboot" = yes ]; then
35 echo "ERROR: ABORTING BOOT (sending SIGTERM to parent)!"
46 echo "Installing ipsec manual keys/policies."
47 ${ipsec_program} -f $ipsec_file
52 echo "Clearing ipsec manual keys/policies."
54 # still not 100% sure if we would like to do this.
55 # it is very questionable to do this during shutdown session, since
56 # it can hang any of remaining IPv4/v6 session.
64 echo "Reloading ipsec manual keys/policies."
67 ${ipsec_program} -f "$ipsec_file"