aboutsummaryrefslogtreecommitdiff
path: root/mail/drac/files
diff options
context:
space:
mode:
authorNorikatsu Shigemura <nork@FreeBSD.org>2004-05-04 12:56:56 +0000
committerNorikatsu Shigemura <nork@FreeBSD.org>2004-05-04 12:56:56 +0000
commit3478a6476feca92234131a705a65ee573c7c513d (patch)
treef8dee1fcf08c011b2ceef194596348084c8adf89 /mail/drac/files
parent5855b8edfb242d2dd9416602e5bd27b31c743622 (diff)
downloadports-3478a6476feca92234131a705a65ee573c7c513d.tar.gz
ports-3478a6476feca92234131a705a65ee573c7c513d.zip
o Minor text formatting changes when spitting out WITH_* tweaks;
use spaces, not tabs. o rcNG-fy. + Rename rc.conf(5) variable "drac_flags" to "dracd_flags". + Display pkg-message after install, warning admins of the rc.conf(5) variable name change. o Bump PORTREVISION accordingly. PR: ports/66234 Submitted by: Jeremy Chadwick <freebsd@jdc.parodius.com>
Notes
Notes: svn path=/head/; revision=108366
Diffstat (limited to 'mail/drac/files')
-rw-r--r--mail/drac/files/dracd.sh50
1 files changed, 21 insertions, 29 deletions
diff --git a/mail/drac/files/dracd.sh b/mail/drac/files/dracd.sh
index 0490ac2f9114..7bb1a3dcd895 100644
--- a/mail/drac/files/dracd.sh
+++ b/mail/drac/files/dracd.sh
@@ -1,34 +1,26 @@
#!/bin/sh
+# $FreeBSD$
-if ! PREFIX=$(/bin/expr $0 : "\(/.*\)/etc/rc\.d/${0##*/}\$"); then
- echo "$0: Cannot determine the PREFIX" >&2
- exit 64
-fi
+# PROVIDE: dracd
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: FreeBSD shutdown
-if [ -r /etc/defaults/rc.conf ]; then
- . /etc/defaults/rc.conf
- source_rc_confs
-elif [ -r /etc/rc.conf ]; then
- . /etc/rc.conf
-fi
+# Define these dracd_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/dracd
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+dracd_enable="NO"
+dracd_flags=""
-case "$1" in
-start)
- case ${dracd_enable:-NO} in
- [Yy][Ee][Ss])
- ${dracd_program:-${PREFIX}/sbin/rpc.dracd} ${drac_flags} && echo -n ' dracd'
- ;;
- esac
- ;;
-stop)
- case ${dracd_enable:-NO} in
- [Yy][Ee][Ss])
- /usr/bin/killall rpc.dracd >/dev/null 2>&1 && echo -n ' dracd'
- esac
- ;;
-*)
- echo "Usage: `basename $0` {start|stop}" >&2
- ;;
-esac
+. %%RC_SUBR%%
-exit 0
+name="dracd"
+rcvar=`set_rcvar`
+command="%%PREFIX%%/sbin/rpc.dracd"
+
+load_rc_config $name
+run_rc_command "$1"