summaryrefslogtreecommitdiff
path: root/sysutils/munin-node/files
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2013-05-31 11:54:01 +0000
committerChris Rees <crees@FreeBSD.org>2013-05-31 11:54:01 +0000
commit16eb7c2ca089906fc35060aac00e8522c52a2fd9 (patch)
tree0b5233ed2a1bc25f12dc9d56da8b18ad62e8ca06 /sysutils/munin-node/files
parentActually remove bitchx-devel and add a VuXML entry. (diff)
Stop checking for get_pidfile_from_conf function in rc.subr.
It is present in all supported versions of FreeBSD, and has had poor takeup. I strongly suspect the strange-looking checks are partially to blame for scaring maintainers off. Go forth and please use it! PR: ports/178269 Approved by: maintainers of all ports involved
Notes
Notes: svn path=/head/; revision=319487
Diffstat (limited to 'sysutils/munin-node/files')
-rw-r--r--sysutils/munin-node/files/munin-node.in12
-rw-r--r--sysutils/munin-node/files/munin-sched.in12
2 files changed, 8 insertions, 16 deletions
diff --git a/sysutils/munin-node/files/munin-node.in b/sysutils/munin-node/files/munin-node.in
index e59f4dd135cd..9784e3176fb2 100644
--- a/sysutils/munin-node/files/munin-node.in
+++ b/sysutils/munin-node/files/munin-node.in
@@ -15,7 +15,7 @@
. /etc/rc.subr
-name="munin_node"
+name=munin_node
rcvar=munin_node_enable
load_rc_config $name
@@ -31,12 +31,8 @@ stop_precmd=find_pidfile
find_pidfile()
{
- if type get_pidfile_from_conf >/dev/null 2>&1 &&
- get_pidfile_from_conf pid_file $munin_node_config; then
- pidfile="$_pidfile_from_conf"
- else
- pidfile=`awk '$1 == "pid_file" { print $2 }' $munin_node_config`
- fi
+ get_pidfile_from_conf pid_file $munin_node_config
+ pidfile="$_pidfile_from_conf"
}
-run_rc_command "$1"
+run_rc_command $1
diff --git a/sysutils/munin-node/files/munin-sched.in b/sysutils/munin-node/files/munin-sched.in
index c88ad6ab3d0f..45e76b661043 100644
--- a/sysutils/munin-node/files/munin-sched.in
+++ b/sysutils/munin-node/files/munin-sched.in
@@ -15,7 +15,7 @@
. /etc/rc.subr
-name="munin_sched"
+name=munin_sched
rcvar=munin_sched_enable
load_rc_config $name
@@ -30,13 +30,9 @@ stop_precmd=find_pidfile
find_pidfile()
{
- if type get_pidfile_from_conf >/dev/null 2>&1 &&
- get_pidfile_from_conf pid_file $munin_sched_config; then
- pidfile="${_pidfile_from_conf%node*}sched"
- pidfile="${pidfile}${_pidfile_from_conf#*node}"
- else
- pidfile=`awk '$1 == "pid_file" { gsub("node","sched",$2); print $2; }' $munin_sched_config`
- fi
+ get_pidfile_from_conf pid_file $munin_sched_config
+ pidfile="${_pidfile_from_conf%node*}sched"
+ pidfile="${pidfile}${_pidfile_from_conf#*node}"
}
run_rc_command "$1"