aboutsummaryrefslogtreecommitdiffstats
path: root/security/racoon
diff options
context:
space:
mode:
authorsumikawa <sumikawa@FreeBSD.org>2004-01-06 23:31:09 +0800
committersumikawa <sumikawa@FreeBSD.org>2004-01-06 23:31:09 +0800
commita4ceb2a99aaae35519fcb5867c748a67c77c36c1 (patch)
tree13054dfd0b1a1011667ff836763b053429c0da12 /security/racoon
parent317fa6ceeb59d8f822cc65ebc473db6279e388e0 (diff)
downloadfreebsd-ports-gnome-a4ceb2a99aaae35519fcb5867c748a67c77c36c1.tar.gz
freebsd-ports-gnome-a4ceb2a99aaae35519fcb5867c748a67c77c36c1.tar.zst
freebsd-ports-gnome-a4ceb2a99aaae35519fcb5867c748a67c77c36c1.zip
rcNG'fy racoon.sh and removed unnecessary patches.
Submitted by: ume
Diffstat (limited to 'security/racoon')
-rw-r--r--security/racoon/Makefile8
-rw-r--r--security/racoon/files/patch-ae16
-rw-r--r--security/racoon/files/patch-af14
-rw-r--r--security/racoon/files/racoon.sh56
4 files changed, 47 insertions, 47 deletions
diff --git a/security/racoon/Makefile b/security/racoon/Makefile
index bfc912bc9ae4..debfb1ed7b18 100644
--- a/security/racoon/Makefile
+++ b/security/racoon/Makefile
@@ -7,6 +7,7 @@
PORTNAME= racoon
PORTVERSION= 20030826a
+PORTREVISION= 1
CATEGORIES= security net
MASTER_SITES= ftp://ftp.kame.net/pub/kame/misc/
@@ -17,6 +18,7 @@ COMMENT= KAME racoon IKE daemon
BROKEN= "You must upgrade the OS"
.endif
+USE_RC_SUBR= YES
USE_OPENSSL= YES
WRKSRC= ${WRKDIR}/${DISTNAME}/racoon
@@ -31,6 +33,9 @@ CONFIGURE_ARGS+=--with-pkgversion=freebsd-${PORTVERSION}
MAN5= racoon.conf.5
MAN8= racoon.8
+RC_SCRIPTS_SUB= PREFIX=${PREFIX} \
+ RC_SUBR=${RC_SUBR}
+
pre-patch:
${MV} ${WRKSRC}/racoon.8 ${WRKSRC}/racoon.8.in
@@ -38,7 +43,8 @@ pre-configure:
(cd ${WRKSRC}/../libipsec; make)
post-install:
- @${SED} 's@%PREFIX%@${LOCALBASE}@g' ${FILESDIR}/racoon.sh > ${PREFIX}/etc/rc.d/racoon.sh
+ @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${FILESDIR}/racoon.sh > ${PREFIX}/etc/rc.d/racoon.sh
@${CHMOD} +x ${PREFIX}/etc/rc.d/racoon.sh
@if [ -z `/sbin/sysctl -a | ${GREP} -q ipsec && echo ipsec` ]; then \
${ECHO_MSG} "WARNING: IPsec feature is disabled on this host"; \
diff --git a/security/racoon/files/patch-ae b/security/racoon/files/patch-ae
deleted file mode 100644
index 66fed09eb1c8..000000000000
--- a/security/racoon/files/patch-ae
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ae,v 1.9 2001/08/02 12:44:18 itojun Exp $
-
---- ../libipsec/key_debug.c- Thu Aug 2 21:38:17 2001
-+++ ../libipsec/key_debug.c Thu Aug 2 21:38:44 2001
-@@ -392,9 +392,8 @@
-
- printf("sadb_x_sa2{ mode=%u reqid=%u\n",
- sa2->sadb_x_sa2_mode, sa2->sadb_x_sa2_reqid);
-- printf(" reserved1=%u reserved2=%u sequence=%u }\n",
-- sa2->sadb_x_sa2_reserved1, sa2->sadb_x_sa2_reserved2,
-- sa2->sadb_x_sa2_sequence);
-+ printf(" reserved1=%u reserved2=%u }\n",
-+ sa2->sadb_x_sa2_reserved1, sa2->sadb_x_sa2_reserved2);
-
- return;
- }
diff --git a/security/racoon/files/patch-af b/security/racoon/files/patch-af
deleted file mode 100644
index d4563bc11a42..000000000000
--- a/security/racoon/files/patch-af
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-af,v 1.1 2001/08/02 12:44:18 itojun Exp $
-
---- ../libipsec/pfkey_dump.c- Thu Aug 2 21:38:21 2001
-+++ ../libipsec/pfkey_dump.c Thu Aug 2 21:38:34 2001
-@@ -299,8 +299,7 @@
- }
-
- /* replay windoe size & flags */
-- printf("\tseq=0x%08x replay=%u flags=0x%08x ",
-- m_sa2->sadb_x_sa2_sequence,
-+ printf("\treplay=%u flags=0x%08x ",
- m_sa->sadb_sa_replay,
- m_sa->sadb_sa_flags);
-
diff --git a/security/racoon/files/racoon.sh b/security/racoon/files/racoon.sh
index d6a5c1b3098a..ecde585dad87 100644
--- a/security/racoon/files/racoon.sh
+++ b/security/racoon/files/racoon.sh
@@ -1,18 +1,42 @@
#!/bin/sh
-case "$1" in
- start)
- if [ -x %PREFIX%/sbin/racoon ]; then
- %PREFIX%/sbin/racoon -f %PREFIX%/etc/racoon/racoon.conf && echo -n ' racoon'
- fi
- ;;
-
- stop)
- /usr/bin/killall racoon && echo -n ' racoon'
- ;;
-
- *)
- echo "Usage: `basename $0` { start | stop }"
- exit 64
- ;;
-esac
+# Start or stop racoon
+# $FreeBSD$
+
+# PROVIDE: racoon
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: FreeBSD shutdown
+#
+# NOTE for FreeBSD 5.0+:
+# If you want this script to start with the base rc scripts
+# move racoon.sh to /etc/rc.d/racoon
+
+prefix=%%PREFIX%%
+
+# 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="YES" # Enable racoon
+#racoon_program="${prefix}/sbin/racoon" # Location of racoon
+#racoon_flags="" # Flags to racoon program
+
+. %%RC_SUBR%%
+
+name="racoon"
+rcvar=`set_rcvar`
+command="${prefix}/sbin/racoon"
+pidfile="/var/run/racoon.pid"
+required_files="${prefix}/etc/racoon/racoon.conf"
+stop_postcmd="racoon_poststop"
+
+racoon_poststop() {
+ /bin/rm -f ${pidfile}
+}
+
+load_rc_config $name
+run_rc_command "$1"