aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2011-07-21 05:14:57 +0000
committerDoug Barton <dougb@FreeBSD.org>2011-07-21 05:14:57 +0000
commit8d5d707de80c9e2596a35c5bc08bc8b5aec451ee (patch)
treeaf007f8ca33c9b62005ca3c18e3fffac33bcaed3 /security
parent2e128962689f1315d6ba8eb7ce29efbab22a8165 (diff)
downloadports-8d5d707de80c9e2596a35c5bc08bc8b5aec451ee.tar.gz
ports-8d5d707de80c9e2596a35c5bc08bc8b5aec451ee.zip
Notes
Diffstat (limited to 'security')
-rw-r--r--security/ipsec-tools/Makefile2
-rw-r--r--security/ipsec-tools/files/racoon.sh.in42
2 files changed, 26 insertions, 18 deletions
diff --git a/security/ipsec-tools/Makefile b/security/ipsec-tools/Makefile
index 8f413b32cc4f..e12c80231fa9 100644
--- a/security/ipsec-tools/Makefile
+++ b/security/ipsec-tools/Makefile
@@ -11,7 +11,7 @@
PORTNAME= ipsec-tools
PORTVERSION= 0.8.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= SF
diff --git a/security/ipsec-tools/files/racoon.sh.in b/security/ipsec-tools/files/racoon.sh.in
index decfb3816906..7d7c4bf9259e 100644
--- a/security/ipsec-tools/files/racoon.sh.in
+++ b/security/ipsec-tools/files/racoon.sh.in
@@ -1,44 +1,52 @@
#!/bin/sh
-# Start or stop racoon
# $FreeBSD$
-
+#
# PROVIDE: racoon
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
+# REQUIRE: LOGIN
# KEYWORD: shutdown
-
+#
# Define these racoon_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/racoon
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
-#
-[ -z "$racoon_enable" ] && racoon_enable="NO" # Disable by default
-#racoon_flags="" # Flags to racoon program
-racoon_create_dirs=${racoon_create_dirs:-NO} # Create $required_dirs (for
- # /var mfs)?
. /etc/rc.subr
name="racoon"
rcvar=`set_rcvar`
+
+load_rc_config $name
+
+racoon_enable=${racoon_enable:-"NO"} # Disable by default
+racoon_create_dirs=${racoon_create_dirs:-"NO"} # Create $required_dirs
+#racoon_flags="" # Flags to racoon program
+
command="%%PREFIX%%/sbin/${name}"
pidfile="/var/run/${name}.pid"
+
+start_precmd="${name}_prestart"
+stop_postcmd="${name}_cleanup"
+
socketfile="%%STATEDIR%%/${name}.sock"
required_files="%%PREFIX%%/etc/${name}/${name}.conf"
required_dirs="%%STATEDIR%%"
-start_precmd="racoon_cleanup"
-stop_postcmd="racoon_cleanup"
-racoon_cleanup() {
+racoon_cleanup()
+{
/bin/rm -f ${pidfile}
/bin/rm -f ${socketfile}
}
-load_rc_config $name
-if [ "$1" = start -o "$1" = faststart ] && checkyesno "${name}_create_dirs"; then
- /bin/mkdir -p $required_dirs
-fi
+racoon_prestart()
+{
+ racoon_cleanup
+
+ if checkyesno "${name}_create_dirs"; then
+ /bin/mkdir -p $required_dirs
+ fi
+}
+
run_rc_command "$1"