X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=debian%2Fnfs-common.init;h=dc93bea0846a3a13f080b793259339b26982ab19;hp=c6b0a9a284ca79a4baf7011b14c4f68a6d15fa63;hb=d3dcf7a556c2782f02ac275c0c1b708c324b5541;hpb=9ae0ab21cafe223226170d4c1a624f1c05685b02 diff --git a/debian/nfs-common.init b/debian/nfs-common.init index c6b0a9a..dc93bea 100644 --- a/debian/nfs-common.init +++ b/debian/nfs-common.init @@ -2,9 +2,9 @@ ### BEGIN INIT INFO # Provides: nfs-common -# Required-Start: $time +# Required-Start: $portmap $time # Required-Stop: $time -# Default-Start: 2 3 4 5 +# Default-Start: 2 3 4 5 S # Default-Stop: 0 1 6 # Short-Description: NFS support files common to client and server # Description: NFS is a popular protocol for file sharing across @@ -18,6 +18,7 @@ DESC="NFS common utilities" # Read config DEFAULTFILE=/etc/default/nfs-common PREFIX= +NEED_STATD= NEED_IDMAPD= NEED_GSSD= PIPEFS_MOUNTPOINT=/var/lib/nfs/rpc_pipefs @@ -28,6 +29,9 @@ fi . /lib/lsb/init-functions +# Exit if required binaries are missing. +[ -x $PREFIX/sbin/rpc.statd ] || exit 0 + # # Parse the fstab file, and determine whether we need idmapd and gssd. (The # /etc/defaults settings, if any, will override our autodetection.) This code @@ -36,21 +40,24 @@ fi AUTO_NEED_IDMAPD=no AUTO_NEED_GSSD=no -exec 9<&0 /dev/null || true log_end_msg 0 ;; status) - if ! pidof rpc.statd >/dev/null + if [ "$NEED_STATD" = yes ] then - echo "rpc.statd not running" - exit 3 + if ! pidof rpc.statd >/dev/null + then + echo "rpc.statd not running" + exit 3 + fi fi if [ "$NEED_GSSD" = yes ] then if ! pidof rpc.gssd >/dev/null then - echo "rpc.statd running, but rpc.gssd halted" + echo "rpc.gssd not running" exit 3 fi fi @@ -222,12 +251,12 @@ case "$1" in then if ! pidof rpc.idmapd >/dev/null then - echo "rpc.statd running, but rpc.idmapd halted" + echo "rpc.idmapd not running" exit 3 fi fi - echo "rpc.statd running" + echo "all daemons running" exit 0 ;;