diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-01-31 22:16:11 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-01-31 22:16:11 +0000 |
commit | 35a47bbd9288be8e073ad0d00ceeab0d77c9bc80 (patch) | |
tree | f867a3ece51b15dd350acc2629e06773cc4fef1a /net-fs/nfs-utils/files | |
parent | fix copyright (diff) | |
download | gentoo-2-35a47bbd9288be8e073ad0d00ceeab0d77c9bc80.tar.gz gentoo-2-35a47bbd9288be8e073ad0d00ceeab0d77c9bc80.tar.bz2 gentoo-2-35a47bbd9288be8e073ad0d00ceeab0d77c9bc80.zip |
Make sure stop() works even if rpc.statd is dead so init.d doesnt fake stop silently.
Diffstat (limited to 'net-fs/nfs-utils/files')
-rwxr-xr-x | net-fs/nfs-utils/files/rpc.statd.initd | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/net-fs/nfs-utils/files/rpc.statd.initd b/net-fs/nfs-utils/files/rpc.statd.initd index 37e2b4c7b127..14f8b34db6f4 100755 --- a/net-fs/nfs-utils/files/rpc.statd.initd +++ b/net-fs/nfs-utils/files/rpc.statd.initd @@ -1,7 +1,7 @@ #!/sbin/runscript -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.statd.initd,v 1.6 2008/02/04 22:23:24 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.statd.initd,v 1.7 2009/01/31 22:16:11 vapier Exp $ [ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs @@ -14,21 +14,19 @@ depend() { after quota } -is_running() { +start() { # Don't start rpc.statd if already started by someone else ... # Don't try and kill it if it's already dead ... - killall -q -0 ${rpc_bin} -} + if killall -q -0 ${rpc_bin} ; then + return 0 + fi -start() { - is_running && return 0 ebegin "Starting NFS statd" start-stop-daemon --start --exec ${rpc_bin} -- --no-notify ${OPTS_RPC_STATD} eend $? } stop() { - is_running || return 1 ebegin "Stopping NFS statd" start-stop-daemon --stop --exec ${rpc_bin} --pidfile /var/run/rpc.statd.pid eend $? |