X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=debian%2Fnfs-common.init;h=f397e645045719f013acff294905d9ecc885540f;hp=5c34c9e7ae1fae9b72216e5cc9e907ddde7a34b0;hb=415457d63cf2740c7356cb09b4a1577a2e3cb515;hpb=de95c40031904260a31a3686d6a48d7842abccb4 diff --git a/debian/nfs-common.init b/debian/nfs-common.init index 5c34c9e..f397e64 100644 --- a/debian/nfs-common.init +++ b/debian/nfs-common.init @@ -76,6 +76,20 @@ done exec 0<&9 9<&- +# +# We also need idmapd if we run an NFSv4 server. It's fairly difficult +# to autodetect whether there are NFSv4 exports or not, and idmapd is not a +# particularily heavy daemon, so we auto-enable it if we find an /etc/exports +# file. This does not mean that there are NFSv4 or other mounts active (or +# even that nfs-kernel-server is installed), but it matches what the "start" +# condition in nfs-kernel-server's init script does, which has a value in +# itself. +# +if [ -f /etc/exports ]; then + AUTO_NEED_IDMAPD=yes +fi + + case "$NEED_IDMAPD" in yes|no) ;;