X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=debian%2Fnfs-common.init;h=6de833621209841e766b00cce2caa29ac2978334;hp=df5fca289018993800860d35a89e9a8c446dfcae;hb=refs%2Ftags%2Fdebian%2F1%251.0.8-6;hpb=c8635994190cad7c5eefde5869ef16a434834aa0 diff --git a/debian/nfs-common.init b/debian/nfs-common.init index df5fca2..6de8336 100644 --- a/debian/nfs-common.init +++ b/debian/nfs-common.init @@ -127,12 +127,12 @@ case "$1" in cd / # daemons should have root dir as cwd printf "Starting $DESC:" printf " statd" - start-stop-daemon --start --quiet \ + start-stop-daemon --start --oknodo --quiet \ --exec $PREFIX/sbin/rpc.statd -- $STATDOPTS if [ "$NEED_LOCKD" = yes ] then printf " lockd" - start-stop-daemon --start --quiet \ + start-stop-daemon --start --oknodo --quiet \ --exec $PREFIX/sbin/rpc.lockd || true fi if [ "$NEED_IDMAPD" = yes ] || [ "$NEED_GSSD" = yes ] @@ -144,7 +144,7 @@ case "$1" in if [ "$NEED_IDMAPD" = yes ] then printf " idmapd" - start-stop-daemon --start --quiet \ + start-stop-daemon --start --oknodo --quiet \ --make-pidfile --pidfile $IDMAPD_PIDFILE \ --exec /usr/sbin/rpc.idmapd fi @@ -152,7 +152,7 @@ case "$1" in then do_modprobe rpcsec_gss_krb5 printf " gssd" - start-stop-daemon --start --quiet \ + start-stop-daemon --start --oknodo --quiet \ --make-pidfile --pidfile $GSSD_PIDFILE \ --exec /usr/sbin/rpc.gssd -- $RPCGSSDOPTS fi @@ -192,6 +192,44 @@ case "$1" in echo "." ;; + status) + if ! pidof rpc.statd >/dev/null + then + echo "rpc.statd not running" + exit 3 + fi + + if [ "$NEED_GSSD" = yes ] + then + if [ ! -f "$GSSD_PIDFILE" ] || [ "$( pidof rpc.gssd )" != "$( cat $GSSD_PIDFILE )"] + then + echo "rpc.statd running, but rpc.gssd halted" + exit 3 + fi + fi + + if [ "$NEED_LOCKD" = yes ] + then + if ! pidof rpc.lockd >/dev/null + then + echo "rpc.statd running, but rpc.lockd halted" + exit 3 + fi + fi + + if [ "$NEED_IDMAPD" = yes ] + then + if [ ! -f "$IDMAPD_PIDFILE" ] || [ "$( pidof rpc.idmapd )" != "$( cat $IDMAPD_PIDFILE )"] + then + echo "rpc.statd running, but rpc.idmapd halted" + exit 3 + fi + fi + + echo "rpc.statd running" + exit 0 + ;; + restart | force-reload) $0 stop sleep 1