diff options
-rw-r--r-- | net/rinetd/Makefile | 14 | ||||
-rw-r--r-- | net/rinetd/files/rinetd.sh | 28 | ||||
-rw-r--r-- | net/rinetd/pkg-message | 10 |
3 files changed, 50 insertions, 2 deletions
diff --git a/net/rinetd/Makefile b/net/rinetd/Makefile index 0f4a865..3029ccf 100644 --- a/net/rinetd/Makefile +++ b/net/rinetd/Makefile @@ -17,13 +17,23 @@ COMMENT= A simple TCP port redirector WRKSRC= ${WRKDIR}/rinetd/ MAN8= rinetd.8 -PORTDOCS= index.html README -PLIST_FILES= sbin/rinetd +PORTDOCS= index.html +PLIST_FILES= etc/rc.d/rinetd.sh sbin/rinetd + + +USE_RC_SUBR= yes +RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} + +post-patch: + @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${FILESDIR}/rinetd.sh > ${WRKDIR}/rinetd.sh post-install: + ${INSTALL_SCRIPT} -m 751 ${WRKDIR}/rinetd.sh ${PREFIX}/etc/rc.d/rinetd.sh .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} cd ${WRKSRC} ; ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} .endif + @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/net/rinetd/files/rinetd.sh b/net/rinetd/files/rinetd.sh new file mode 100644 index 0000000..dc86c53 --- /dev/null +++ b/net/rinetd/files/rinetd.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +# PROVIDE: rinetd +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable rinetd: +# rinetd_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable rinetd +# rinetd_flags (str): Set to "" by default. +# Extra flags passed to start command +# +. %%RC_SUBR%% + +name="rinetd" +rcvar=`set_rcvar` + +command="%%PREFIX%%/sbin/rinetd" +pidfile="/var/run/rinetd.pid" + +[ -z "$rinetd_enable" ] && rinetd_enable="NO" +[ -z "$rinetd_flags" ] && rinetd_flags="" + +load_rc_config $name + +run_rc_command "$1" diff --git a/net/rinetd/pkg-message b/net/rinetd/pkg-message new file mode 100644 index 0000000..81a5e47 --- /dev/null +++ b/net/rinetd/pkg-message @@ -0,0 +1,10 @@ + *********************************** + * !!!!!!!!!!! WARNING !!!!!!!!!!! * + *********************************** +Since 0.62_1, rinetd startup script is now enabled/disabled via +rc.subr. +Available variables: +# rinetd_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable rinetd +# rinetd_flags (str): Set to "" by default. +# Extra flags passed to start command |