diff options
Diffstat (limited to 'net/dhid')
-rw-r--r-- | net/dhid/Makefile | 10 | ||||
-rw-r--r-- | net/dhid/files/dhid.sh | 36 |
2 files changed, 13 insertions, 33 deletions
diff --git a/net/dhid/Makefile b/net/dhid/Makefile index eb16642f252..c20112d8c55 100644 --- a/net/dhid/Makefile +++ b/net/dhid/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2001/02/17 18:18:46 wiz Exp $ +# $NetBSD: Makefile,v 1.8 2002/09/23 07:07:02 grant Exp $ # DISTNAME= dhid-4.0.1 @@ -11,16 +11,11 @@ COMMENT= Dynamic Host Information System client daemon DEPENDS+= gmp-[0-9]*:../../devel/gmp -do-configure: - ${SED} \ - -e "s,@PREFIX@,${PREFIX},g" \ - -e "s,@ECHO@,${ECHO},g" \ - < ${FILESDIR}/dhid.sh > ${WRKDIR}/dhid.sh +RCD_SCRIPTS= dhid do-install: ${INSTALL_PROGRAM} ${WRKSRC}/dhid ${PREFIX}/sbin ${INSTALL_PROGRAM} ${WRKSRC}/genkeys ${PREFIX}/sbin/dhid-genkeys - ${INSTALL_SCRIPT} ${WRKDIR}/dhid.sh ${PREFIX}/etc/rc.d/dhid ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/dhid ${INSTALL_DATA} ${WRKSRC}/COPYRIGHT ${PREFIX}/share/doc/dhid ${INSTALL_DATA} ${WRKSRC}/AUTHORS ${PREFIX}/share/doc/dhid @@ -28,4 +23,5 @@ do-install: ${INSTALL_DATA} ${WRKSRC}/WHATSNEW ${PREFIX}/share/doc/dhid ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/dhid +.include "../../mk/bsd.pkg.install.mk" .include "../../mk/bsd.pkg.mk" diff --git a/net/dhid/files/dhid.sh b/net/dhid/files/dhid.sh index 9720f185f36..4381673e6f4 100644 --- a/net/dhid/files/dhid.sh +++ b/net/dhid/files/dhid.sh @@ -1,32 +1,16 @@ -#!/bin/sh +#!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: dhid.sh,v 1.3 2000/09/20 05:14:11 jlam Exp $ +# $NetBSD: dhid.sh,v 1.4 2002/09/23 07:07:03 grant Exp $ # # PROVIDE: dhid # REQUIRE: NETWORK -DHID=@PREFIX@/sbin/dhid +. /etc/rc.subr -case "$1" in -start) - if [ ! -f "@PREFIX@/etc/dhid.conf" ]; then - pkg_info -D dhid - echo "@PREFIX@/etc/dhid.conf not found, exiting." - exit 1 - fi - if [ -f ${DHID} ]; then - @ECHO@ -n " dhid" - ${DHID} - fi - ;; -stop) - if [ -f /var/run/dhid.pid ]; then - kill `cat /var/run/dhid.pid` - rm -f /var/run/dhid.pid - fi - ;; -*) - echo "Usage: $0 {start,stop}" - exit 1 - ;; -esac +name="dhid" +command="@PREFIX@/sbin/${name}" +pidfile="/var/run/${name}.pid" +required_files="@PKG_SYSCONFDIR@/dhid.conf" + +load_rc_config $name +run_rc_command "$1" |