]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - debian/nfs-common.init
Imported Debian patch 1.0.9-6
[nfs-utils.git] / debian / nfs-common.init
index 5c34c9e7ae1fae9b72216e5cc9e907ddde7a34b0..f397e645045719f013acff294905d9ecc885540f 100644 (file)
@@ -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)    
         ;;