diff options
author | edwin <edwin@FreeBSD.org> | 2004-12-14 05:38:32 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2004-12-14 05:38:32 +0800 |
commit | 4b40ff0a9fe4eb31ce0e736673ffc2f113c5110b (patch) | |
tree | 7767cbffb680eb16a79232774f112dacd99c34c8 /net/freenet6 | |
parent | 80bc966aa11da0fe30aa0bc9222efcdf4bae6d9a (diff) | |
download | freebsd-ports-gnome-4b40ff0a9fe4eb31ce0e736673ffc2f113c5110b.tar.gz freebsd-ports-gnome-4b40ff0a9fe4eb31ce0e736673ffc2f113c5110b.tar.zst freebsd-ports-gnome-4b40ff0a9fe4eb31ce0e736673ffc2f113c5110b.zip |
Let net/freenet6 use rc.subr
Diffstat (limited to 'net/freenet6')
-rw-r--r-- | net/freenet6/Makefile | 8 | ||||
-rw-r--r-- | net/freenet6/files/freenet6.sh.in | 48 | ||||
-rw-r--r-- | net/freenet6/files/pkg-message.in | 4 |
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. |