aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/openhpi/files
diff options
context:
space:
mode:
authortijl <tijl@FreeBSD.org>2016-03-22 16:52:27 +0800
committertijl <tijl@FreeBSD.org>2016-03-22 16:52:27 +0800
commit5131a7ccfe0a5468c6343f474e9c4eab1e921d00 (patch)
tree5752c59326ac80d658c0c9de9b3558a7f8181ee5 /sysutils/openhpi/files
parentcf252241d1562432eef092a24a9f0a636d0d242d (diff)
downloadfreebsd-ports-gnome-5131a7ccfe0a5468c6343f474e9c4eab1e921d00.tar.gz
freebsd-ports-gnome-5131a7ccfe0a5468c6343f474e9c4eab1e921d00.tar.zst
freebsd-ports-gnome-5131a7ccfe0a5468c6343f474e9c4eab1e921d00.zip
Improve the rc script a bit. "-c <conf>" isn't optional. Also use
%%ETCDIR%% as suggested by jbeich.
Diffstat (limited to 'sysutils/openhpi/files')
-rw-r--r--sysutils/openhpi/files/openhpid.in11
1 files changed, 6 insertions, 5 deletions
diff --git a/sysutils/openhpi/files/openhpid.in b/sysutils/openhpi/files/openhpid.in
index e7b1510dc8b9..7ff9b6bfd7cf 100644
--- a/sysutils/openhpi/files/openhpid.in
+++ b/sysutils/openhpi/files/openhpid.in
@@ -9,16 +9,17 @@
# Add the following to /etc/rc.conf[.local] to enable this service
#
# openhpid_enable="YES"
-# openhpid_flags="-c %%PREFIX%%/etc/openhpi/openhpi.conf"
#
. /etc/rc.subr
-name="openhpid"
-rcvar="openhpid_enable"
-command="%%PREFIX%%/sbin/openhpid"
+: ${openhpid_enable:=NO} ${openhpid_config:=%%ETCDIR%%/openhpi.conf}
-: ${openhpid_enable=NO} ${openhpid_flags=-c %%PREFIX%%/etc/openhpi/openhpi.conf}
+name=openhpid
+rcvar=openhpid_enable
+command="%%PREFIX%%/sbin/openhpid"
+command_args="-c ${openhpid_config}"
+required_files="${openhpid_config}"
load_rc_config ${name}
run_rc_command "$1"