SOURCES: rpcidmapd.init - /proc/fs/nfsd must be mounted before idm...

baggins baggins at pld-linux.org
Wed Apr 4 19:18:35 CEST 2007


Author: baggins                      Date: Wed Apr  4 17:18:35 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- /proc/fs/nfsd must be mounted before idmapd is started on server

---- Files affected:
SOURCES:
   rpcidmapd.init (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: SOURCES/rpcidmapd.init
diff -u SOURCES/rpcidmapd.init:1.4 SOURCES/rpcidmapd.init:1.5
--- SOURCES/rpcidmapd.init:1.4	Sat Mar 31 22:54:12 2007
+++ SOURCES/rpcidmapd.init	Wed Apr  4 19:18:30 2007
@@ -35,6 +35,9 @@
 # /usr may be on NFS, fail silently, nfsfs will start it
 [ -x /usr/sbin/rpc.idmapd ] || exit 0
 
+# Find out what the current runlevel dir is
+RUNLEVELDIR=$(cat /var/run/runlevel.dir)
+
 RETVAL=0
 
 # See how we were called.
@@ -42,6 +45,14 @@
   start)
 	# Check if the service is already running?
 	if [ ! -f /var/lock/subsys/idmapd ]; then
+		# This is whacko, but we need /proc/fs/nfsd mounted before
+		# starting idmapd on NFS server
+		if [ -e "$RUNLEVELDIR/S*nfs" ]; then
+			if ! grep -q nfsd /proc/mounts ; then
+				modprobe -s nfsd > /dev/null 2>&1
+				run_cmd "Mounting /proc/fs/nfsd filesystem" mount -t nfsd nfsd /proc/fs/nfsd
+			fi
+		fi
 		if ! grep -q rpc_pipefs /proc/mounts ; then
 			modprobe -s sunrpc >/dev/null 2>&1
 			run_cmd "Mounting /var/lib/nfs/rpc_pipefs filesystem" \
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/rpcidmapd.init?r1=1.4&r2=1.5&f=u



More information about the pld-cvs-commit mailing list