X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=debian%2Fnfs-common.init;h=80dce3ee70f5b81ec5026254a9b73eaa29e7519e;hp=54701d7d931a2dcb4aa370a7b9823f92af280fb7;hb=b81d81eb5700ebf282b8c89967255561011f47ed;hpb=2ac79288fc1ddc0326af1b2c5b9ffd6d023bf376 diff --git a/debian/nfs-common.init b/debian/nfs-common.init index 54701d7..80dce3e 100644 --- a/debian/nfs-common.init +++ b/debian/nfs-common.init @@ -63,7 +63,7 @@ fi # condition in nfs-kernel-server's init script does, which has a value in # itself. # -if [ -f /etc/exports ]; then +if [ -f /etc/exports ] && grep -q '^ .*/' /etc/exports; then AUTO_NEED_IDMAPD=yes fi @@ -84,11 +84,6 @@ case "$NEED_GSSD" in ;; esac -# Exit if required binaries are missing. -[ -x $PREFIX/sbin/rpc.statd ] || exit 0 -[ -x /usr/sbin/rpc.idmapd ] || [ "$NEED_IDMAPD" = no ] || exit 0 -[ -x /usr/sbin/rpc.gssd ] || [ "$NEED_GSSD" = no ] || exit 0 - do_modprobe() { if [ -x /sbin/modprobe -a -f /proc/modules ] then @@ -130,6 +125,11 @@ case "$1" in exit $? fi + # Don't start idmapd and gssd if we don't have them (say, if /usr is not + # up yet). + [ -x /usr/sbin/rpc.idmapd ] || NEED_IDMAPD=no + [ -x /usr/sbin/rpc.gssd ] || NEED_GSSD=no + if [ "$NEED_IDMAPD" = yes ] || [ "$NEED_GSSD" = yes ] then do_modprobe nfs