[Pkg-sysvinit-devel] Bug#383124: umountnfs.sh: Patch to also unmount filesystems on network block devices

Petter Reinholdtsen pere at hungry.com
Tue Sep 5 13:41:54 UTC 2006


tags 383123 + patch
tags 383124 + patch
thanks

> It calls umount unconditionally, as I couldn't see any harm in doing
> it this way.

I do not like this approach.  It bypasses the error reporting code.
Can you try this patch and see if it work too?

Index: debian/changelog
===================================================================
--- debian/changelog	(revisjon 826)
+++ debian/changelog	(arbeidskopi)
@@ -25,6 +25,7 @@
   * Split killall5, last, lastb, mesg and pidof out of the sysvinit
     package into a new sysvutils package to make it easier to replace
     init. (Closes: #385722)
+  * Umount netdev file systems in umountnfs.sh. (Closes: #383124)
 
  -- Petter Reinholdtsen <pere at debian.org>  Wed, 26 Jul 2006 11:37:23 +0200
 
Index: debian/initscripts/etc/init.d/umountnfs.sh
===================================================================
--- debian/initscripts/etc/init.d/umountnfs.sh	(revisjon 815)
+++ debian/initscripts/etc/init.d/umountnfs.sh	(arbeidskopi)
@@ -45,7 +45,7 @@
 	exec 9<&0 </proc/mounts
 
 	DIRS=""
-	while read DEV MTPT FSTYPE REST
+	while read DEV MTPT FSTYPE OPTS REST
 	do
 		case "$MTPT" in
 		  /|/proc|/dev|/dev/pts|/dev/shm|/proc/*|/sys)
@@ -60,6 +60,11 @@
 			DIRS="$MTPT $DIRS"
 			;;
 		esac
+		case "$OPTS" in
+		  _netdev|*,_netdev|_netdev,*|*,_netdev,*)
+			DIRS="$MTPT $DIRS"
+			;;
+		esac
 	done
 
 	exec 0<&9 9<&-




More information about the Pkg-sysvinit-devel mailing list