aboutsummaryrefslogtreecommitdiff
path: root/sysutils/openhpi
diff options
context:
space:
mode:
authorTijl Coosemans <tijl@FreeBSD.org>2016-03-22 08:52:27 +0000
committerTijl Coosemans <tijl@FreeBSD.org>2016-03-22 08:52:27 +0000
commit9af7fc64559a103976a4bc3a98be584e3c7b2426 (patch)
tree5752c59326ac80d658c0c9de9b3558a7f8181ee5 /sysutils/openhpi
parent92f82a10879548c7b337a10274dc490b08469653 (diff)
downloadports-9af7fc64559a103976a4bc3a98be584e3c7b2426.tar.gz
ports-9af7fc64559a103976a4bc3a98be584e3c7b2426.zip
Improve the rc script a bit. "-c <conf>" isn't optional. Also use
%%ETCDIR%% as suggested by jbeich.
Notes
Notes: svn path=/head/; revision=411640
Diffstat (limited to 'sysutils/openhpi')
-rw-r--r--sysutils/openhpi/Makefile1
-rw-r--r--sysutils/openhpi/files/openhpid.in11
2 files changed, 7 insertions, 5 deletions
diff --git a/sysutils/openhpi/Makefile b/sysutils/openhpi/Makefile
index f57b9377d8bb..b79847ebad15 100644
--- a/sysutils/openhpi/Makefile
+++ b/sysutils/openhpi/Makefile
@@ -2,6 +2,7 @@
PORTNAME= openhpi
PORTVERSION= 3.6.1
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= SF/openhpi/openhpi-stable/${PORTVERSION}/
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"