aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--UPDATING7
-rw-r--r--net/freenet6/Makefile8
-rw-r--r--net/freenet6/files/freenet6.sh.in48
-rw-r--r--net/freenet6/files/pkg-message.in4
4 files changed, 46 insertions, 21 deletions
diff --git a/UPDATING b/UPDATING
index 451c96f3a8d1..eed8628106d8 100644
--- a/UPDATING
+++ b/UPDATING
@@ -6,6 +6,13 @@ You should get into the habit of checking this file for changes each
time you update your ports collection, before attempting any port
upgrades.
+20041214:
+ AFFECTS: users of net/freenet6
+ AUTHOR: edwin@FreeBSD.org
+
+ The FreeNet6 Service must now be enabled / disabled in rc.conf:
+ freenet6_enable="YES"
+
20041213:
AFFECTS: users of security/cryptplug, deskutils/kdepim3
AUTHOR: lofi@freebsd.org
diff --git a/net/freenet6/Makefile b/net/freenet6/Makefile
index be2b80ef9815..b72e6c7c6375 100644
--- a/net/freenet6/Makefile
+++ b/net/freenet6/Makefile
@@ -7,7 +7,7 @@
PORTNAME= freenet6
PORTVERSION= 2.1.1
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= net ipv6
MASTER_SITES= http://www.hexago.com/files/
DISTNAME= tspc-${PORTVERSION}-src
@@ -17,6 +17,7 @@ MAINTAINER= edwin@mavetju.org
COMMENT= Freenet6 Tunnel Setup Protocol Client - Free IPv6 tunnel
USE_REINPLACE= yes
+USE_RC_SUBR= yes
WRKSRC= ${WRKDIR}/tspc2
MAN8= tspc.8
@@ -48,7 +49,10 @@ post-install:
post-patch:
@${CP} ${FILESDIR}/freenet6.sh.in ${WRKDIR}/freenet6.sh
- @${REINPLACE_CMD} -e "s|@@PREFIX@@|${PREFIX}|g" ${WRKDIR}/freenet6.sh
+ @${REINPLACE_CMD} \
+ -e "s,%%PREFIX%%,${PREFIX},g" \
+ -e "s,%%RC_SUBR%%,${RC_SUBR},g" \
+ ${WRKDIR}/freenet6.sh
@${CP} ${FILESDIR}/pkg-message.in ${WRKDIR}/pkg-message
@${REINPLACE_CMD} \
diff --git a/net/freenet6/files/freenet6.sh.in b/net/freenet6/files/freenet6.sh.in
index e61408f83a7c..9fc65c0f9042 100644
--- a/net/freenet6/files/freenet6.sh.in
+++ b/net/freenet6/files/freenet6.sh.in
@@ -2,25 +2,35 @@
#
# $FreeBSD$
#
+
+#
+# PROVIDE: freenet6
+# REQUIRE: LOGIN
+# AFTER: network
+# KEYWORD: FreeBSD shutdown
+#
+
+#
# Start or stop the IPv6 tunnel to Freenet6.net
#
+# Add the following lines to /etc/rc.conf to enable freenet6:
+#
+# freenet6_enable="YES"
+# freenet6_flags="-f %%PREFIX%%/etc/tspc.conf"
+#
+
+. %%RC_SUBR%%
+
+name=freenet6
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/bin/tspc
+required_files=%%PREFIX%%/etc/tspc.conf
+
+# set defaults
+
+freenet6_enable=${freenet6_enable:-"NO"}
+freenet6_flags=${freenet6_flags:-"-f %%PREFIX%%/etc/tspc.conf"}
-case "$1" in
- start)
- if [ -f @@PREFIX@@/etc/tspc.conf ]; then
- @@PREFIX@@/bin/tspc -f @@PREFIX@@/etc/tspc.conf && \
- echo -n " freenet6"
- fi
- ;;
-
- stop)
- killall tspc && echo -n " freenet6"
- ;;
-
- *)
- echo ""
- echo "Usage: `basename $0` { start | stop }"
- echo ""
- exit 64
- ;;
-esac
+load_rc_config $name
+run_rc_command "$1"
diff --git a/net/freenet6/files/pkg-message.in b/net/freenet6/files/pkg-message.in
index c8d9f3515cf3..c39f1aa0cb93 100644
--- a/net/freenet6/files/pkg-message.in
+++ b/net/freenet6/files/pkg-message.in
@@ -8,3 +8,7 @@ Now that the package is installed, please finish it with the following steps:
Please note that tsps[12].freenet6.net are not in service anymore,
please use broker.freenet6.net instead.
+
+Net/freenet6 now supports rc.subr.
+Please add 'freenet6_enable="YES"' to your /etc/rc.conf to make it
+start autoamtically at startup.