summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoda <joda@pkgsrc.org>2002-07-29 11:55:26 +0000
committerjoda <joda@pkgsrc.org>2002-07-29 11:55:26 +0000
commit1e3441c9dc8e7e5b22a585995d009a02136d5c9a (patch)
treedae8660813c55a42f986054fb2ef5bbf40c37c4b
parent8ed9b88dbd3acec4424bdd93d1b15c218c2f789b (diff)
downloadpkgsrc-1e3441c9dc8e7e5b22a585995d009a02136d5c9a.tar.gz
rc.d-ify
-rw-r--r--net/zephyr/files/zhm.sh24
1 files changed, 19 insertions, 5 deletions
diff --git a/net/zephyr/files/zhm.sh b/net/zephyr/files/zhm.sh
index a7da9e55ba5..c214a1d9266 100644
--- a/net/zephyr/files/zhm.sh
+++ b/net/zephyr/files/zhm.sh
@@ -1,10 +1,24 @@
#!/bin/sh
#
-# $NetBSD: zhm.sh,v 1.2 1998/08/07 11:11:06 agc Exp $
+# $NetBSD: zhm.sh,v 1.3 2002/07/29 11:55:26 joda Exp $
#
+# PROVIDE: zhm
+# REQUIRE: DAEMON
+
+. /etc/rc.subr
+
PREFIX=${PREFIX-@prefix@}
-if [ -x ${PREFIX}/sbin/zhm -a -f ${PREFIX}/etc/zephyr/server.list ] ; then
- PATH=${PREFIX}/sbin:${PREFIX}/bin:$PATH ; export PATH
- zhm `cat ${PREFIX}/etc/zephyr/server.list` && echo -n ' zhm'
-fi
+name="zhm"
+rcvar="$name"
+command="${PREFIX}/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+required_files="${PREFIX}/etc/zephyr/server.list"
+start_precmd="zhm_precmd"
+
+zhm_precmd()
+{
+ _flags="`cat ${PREFIX}/etc/zephyr/server.list`"
+}
+load_rc_config "$name"
+run_rc_command "$1"