diff options
author | Hajimu UMEMOTO <ume@FreeBSD.org> | 2003-09-06 17:45:02 +0000 |
---|---|---|
committer | Hajimu UMEMOTO <ume@FreeBSD.org> | 2003-09-06 17:45:02 +0000 |
commit | e327f54df0d5cc68ce9c1f430b4c53c3a5059be5 (patch) | |
tree | bed8a138471c264ab278f5f597adad1485415cc0 /net/dtcpclient | |
parent | Update to 0.6.14. (diff) |
Use USE_RC_SUBR.
Notes
Notes:
svn path=/head/; revision=88639
Diffstat (limited to 'net/dtcpclient')
-rw-r--r-- | net/dtcpclient/Makefile | 18 | ||||
-rw-r--r-- | net/dtcpclient/files/dtcpclient.sh | 40 | ||||
-rw-r--r-- | net/dtcpclient/pkg-plist | 2 |
3 files changed, 56 insertions, 4 deletions
diff --git a/net/dtcpclient/Makefile b/net/dtcpclient/Makefile index e532264b1944..14ba60131371 100644 --- a/net/dtcpclient/Makefile +++ b/net/dtcpclient/Makefile @@ -7,18 +7,30 @@ PORTNAME= dtcpclient PORTVERSION= 20030324 -#PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= net ipv6 MASTER_SITES= http://www.imasy.or.jp/~ume/ipv6/ MAINTAINER= ume@FreeBSD.org COMMENT= Dynamic Tunnel Configuration Protocol client +USE_RC_SUBR= YES + MAN8= dtcpclient.8 MANCOMPRESSED= yes +RC_SCRIPT= ${PREFIX}/etc/rc.d/dtcpclient.sh +RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} + +pre-install: + @if [ -f ${RC_SCRIPT} ]; then \ + echo "Remove old ${RC_SCRIPT} before install."; \ + exit 1; \ + fi + post-install: - ${INSTALL_SCRIPT} ${WRKSRC}/dtcpclient.sh \ - ${PREFIX}/etc/rc.d/dtcpclient.sh.sample + @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${FILESDIR}/dtcpclient.sh > ${WRKDIR}/dtcpclient.sh + @${INSTALL_SCRIPT} ${WRKDIR}/dtcpclient.sh ${RC_SCRIPT} .include <bsd.port.mk> diff --git a/net/dtcpclient/files/dtcpclient.sh b/net/dtcpclient/files/dtcpclient.sh new file mode 100644 index 000000000000..884fad8f03eb --- /dev/null +++ b/net/dtcpclient/files/dtcpclient.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: dtcpclient +# 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 imapd.sh to /etc/rc.d/dtcpclient + +prefix=%%PREFIX%% + +# Define these imapd_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/dtcpclient +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +dtcpclient_enable="NO" # Enable dtcpclient +#dtcpclient_program="${prefix}/sbin/dtcpclient" # Location of dtcpclient +dtcpclient_server="" # DTCP server name +dtcpclient_username="" # DTCP user name +dtcpclient_flags="-t network -Dl" # Flags to dtcpclient program + +. %%RC_SUBR%% + +name="dtcpclient" +rcvar=`set_rcvar` +command="${prefix}/sbin/${name}" +pidfile="/var/run/${name}.pid" +extra_commands="reload" + +load_rc_config $name +flags="${dtcpclient_flags} -u ${dtcpclient_username} ${dtcpclient_server}" +run_rc_command "$1" diff --git a/net/dtcpclient/pkg-plist b/net/dtcpclient/pkg-plist index 4f76e6f2db82..35c47dc55075 100644 --- a/net/dtcpclient/pkg-plist +++ b/net/dtcpclient/pkg-plist @@ -2,4 +2,4 @@ sbin/dtcpclient @unexec if cmp -s %D/etc/dtcpclient.script %D/etc/dtcpclient.script.sample; then rm -f %D/etc/dtcpclient.script; fi etc/dtcpclient.script.sample @exec [ -f %B/dtcpclient.script ] || cp %B/%f %B/dtcpclient.script -etc/rc.d/dtcpclient.sh.sample +etc/rc.d/dtcpclient.sh |