aboutsummaryrefslogtreecommitdiffstats
path: root/main/nfs-utils/rpc.statd.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/nfs-utils/rpc.statd.initd')
-rw-r--r--main/nfs-utils/rpc.statd.initd26
1 files changed, 8 insertions, 18 deletions
diff --git a/main/nfs-utils/rpc.statd.initd b/main/nfs-utils/rpc.statd.initd
index ea78b9aef6..805d416f80 100644
--- a/main/nfs-utils/rpc.statd.initd
+++ b/main/nfs-utils/rpc.statd.initd
@@ -1,11 +1,12 @@
#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs
-rpc_bin=/sbin/rpc.statd
-rpc_pid=/var/run/rpc.statd.pid
+name="NFS statd"
+
+command="/sbin/rpc.statd"
+command_args="$OPTS_RPC_STATD"
+pidfile="/run/rpc.statd.pid"
depend() {
use ypbind net
@@ -14,19 +15,8 @@ depend() {
}
start() {
- # Don't start rpc.statd if already started by someone else ...
- # Don't try and kill it if it's already dead ...
- if killall -q -0 ${rpc_bin} ; then
- return 0
- fi
-
- ebegin "Starting NFS statd"
- start-stop-daemon --start --exec ${rpc_bin} -- --no-notify ${OPTS_RPC_STATD}
- eend $?
-}
+ # Don't start rpc.statd if already started by someone else...
+ killall -q -0 "$command" && return 0
-stop() {
- ebegin "Stopping NFS statd"
- start-stop-daemon --stop --exec ${rpc_bin} --pidfile /var/run/rpc.statd.pid
- eend $?
+ default_start
}