diff options
Diffstat (limited to 'net/dhid/files/dhid.sh')
-rw-r--r-- | net/dhid/files/dhid.sh | 36 |
1 files changed, 10 insertions, 26 deletions
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" |