diff options
author | grant <grant@pkgsrc.org> | 2002-09-23 07:07:02 +0000 |
---|---|---|
committer | grant <grant@pkgsrc.org> | 2002-09-23 07:07:02 +0000 |
commit | 74c6e1f3e284bd31b0d3224adee09f5d6f87a5fd (patch) | |
tree | cee1be88b991dc292034133b562e901f8246dd70 /net/dhid/files/dhid.sh | |
parent | fb98d9c70de3941767b911b65f6cc58dc7a7bb17 (diff) | |
download | pkgsrc-74c6e1f3e284bd31b0d3224adee09f5d6f87a5fd.tar.gz |
* use bsd.pkg.install.mk and automatic rc.d script handling.
* convert to rc.subr-style script.
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" |