1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00

Let net/freenet6 use rc.subr

This commit is contained in:
Edwin Groothuis 2004-12-13 21:38:32 +00:00
parent c1538d88f7
commit 272c66538e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=123965
4 changed files with 45 additions and 20 deletions

View File

@ -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

View File

@ -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} \

View File

@ -2,25 +2,35 @@
#
# $FreeBSD$
#
# Start or stop the IPv6 tunnel to Freenet6.net
#
# PROVIDE: freenet6
# REQUIRE: LOGIN
# AFTER: network
# KEYWORD: FreeBSD shutdown
#
case "$1" in
start)
if [ -f @@PREFIX@@/etc/tspc.conf ]; then
@@PREFIX@@/bin/tspc -f @@PREFIX@@/etc/tspc.conf && \
echo -n " freenet6"
fi
;;
#
# 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"
#
stop)
killall tspc && echo -n " freenet6"
;;
. %%RC_SUBR%%
*)
echo ""
echo "Usage: `basename $0` { start | stop }"
echo ""
exit 64
;;
esac
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"}
load_rc_config $name
run_rc_command "$1"

View File

@ -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.