[Pkg-sysvinit-devel] Bug#433119: nfs-common: NFS volume no longer mounted on boot

Steinar H. Gunderson sgunderson at bigfoot.com
Mon Jul 16 09:39:10 UTC 2007


On Sun, Jul 15, 2007 at 03:20:57PM +0200, Elimar Riesebieter wrote:
> Starting NFS common utilities: statd.
> mount.nfs: rpc.statd is not running but is required for remote locking
>    Either use "-o nolocks" to keep locks local, or start statd.

So statd doesn't want to start. Perhaps it would like portmap first. Try this
patch instead:

diff -u sysvinit-2.86.ds1/debian/initscripts/etc/network/if-up.d/mountnfs sysvinit-2.86.ds1/debian/initscripts/etc/network/if-up.d/mountnfs
--- sysvinit-2.86.ds1/debian/initscripts/etc/network/if-up.d/mountnfs
+++ sysvinit-2.86.ds1/debian/initscripts/etc/network/if-up.d/mountnfs
@@ -27,10 +27,9 @@
 
 	exec 9<&0 </etc/fstab
 
-	portmap=no
+	start_nfs=no
 	NETFS=""
 	NETDEV=""
-	gss_or_idmap=no
 	while read DEV MTPT FSTYPE OPTS REST
 	do
 		case "$DEV" in
@@ -48,18 +47,7 @@
 		esac
 		case "$FSTYPE" in
 		  nfs|nfs4)
-			case "$OPTS" in
-			  nolock|*,nolock|nolock,*|*,nolock,*)
-				;;
-			  *)
-				portmap=yes
-				;;
-			esac
-			case "$OPTS" in
-			  sec=krb5|*,sec=krb5|sec=krb5,*|*,sec=krb5i,*|sec=krb5i|*,sec=krb5i|sec=krb5i,*|*,sec=krb5i,*|sec=krb5p|*,sec=krb5p|sec=krb5p,*|*,sec=krb5p,*)
-			  	gss_or_idmap=yes
-				;;
-			esac
+			start_nfs=yes
 			;;
 		  smbfs|cifs|coda|ncp|ncpfs|ocfs2|gfs)
 			;;
@@ -77,40 +65,18 @@
 				;;
 			esac
 		fi
-		if [ "$FSTYPE" = "nfs4" ]
-		then
-			gss_or_idmap=yes
-		fi
 	done
 
 	exec 0<&9 9<&-
 
 	#
-	# With contemporary portmap packages it is no longer necessary
-	# to start portmap here because the package has its own initscript.
-	# This code will disappear after etch.
-	#
-	if [ "$portmap" = yes ]
-	then
-		if [ -x /sbin/portmap ] && ! pidof portmap >/dev/null 2>&1
-		then
-			if [ -x /etc/init.d/portmap ] 
-			then
-				/etc/init.d/portmap start
-			else
-				start-stop-daemon --start --quiet --oknodo --exec /sbin/portmap
-				sleep 1  # FIXME: Actually synchronize with the process?
-			fi
-		fi
-	fi
-
-	#
-	# Initialize nfs-common (which starts rpc.gssd and/or
-	# rpc.idmapd, and loads the right kernel modules if
+	# Initialize nfs-common (which starts rpc.statd, rpc.gssd
+	# and/or rpc.idmapd, and loads the right kernel modules if
 	# applicable) if we use Kerberos and/or NFSv4 mounts.
 	#
-	if [ "$gss_or_idmap" = yes ] && [ -x /etc/init.d/nfs-common ]
+	if [ "$start_nfs" = yes ] && [ -x /etc/init.d/portmap ] && [ -x /etc/init.d/nfs-common ]
 	then
+		/etc/init.d/portmap start
 		/etc/init.d/nfs-common start
 	fi
 
/* Steinar */
-- 
Homepage: http://www.sesse.net/




More information about the Pkg-sysvinit-devel mailing list