aboutsummaryrefslogtreecommitdiff
path: root/net/freenet6
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2004-12-13 21:38:32 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2004-12-13 21:38:32 +0000
commit272c66538e4226e121e82b40abb4d09b48ad0e4c (patch)
tree3a708564f3b0be01422d3cb33334c096cf658960 /net/freenet6
parentc1538d88f73657094f55adad2aa7253e91a77967 (diff)
downloadports-272c66538e4226e121e82b40abb4d09b48ad0e4c.tar.gz
ports-272c66538e4226e121e82b40abb4d09b48ad0e4c.zip
Notes
Diffstat (limited to 'net/freenet6')
-rw-r--r--net/freenet6/Makefile8
-rw-r--r--net/freenet6/files/freenet6.sh.in48
-rw-r--r--net/freenet6/files/pkg-message.in4
3 files changed, 39 insertions, 21 deletions
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.