diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-06-12 16:07:45 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-06-12 16:01:26 +0200 |
commit | cf657bf09d01bc67e66fb39ce8ebec1ca93cbec1 (patch) | |
tree | 350a8824873c726734372a1c5066d1c04b320a7d /main/nfs-utils/rpc.statd.initd | |
parent | 28850b3a43930dcaba7ce82fa55bb53853cf412d (diff) | |
download | aports-cf657bf09d01bc67e66fb39ce8ebec1ca93cbec1.tar.bz2 aports-cf657bf09d01bc67e66fb39ce8ebec1ca93cbec1.tar.xz |
main/nfs-utils: rewrite some init scripts to be more declarative
Diffstat (limited to 'main/nfs-utils/rpc.statd.initd')
-rw-r--r-- | main/nfs-utils/rpc.statd.initd | 26 |
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 } |