[Pkg-sysvinit-commits] r1340 - in sysvinit/trunk/debian: . initscripts/etc/init.d

Petter Reinholdtsen pere at alioth.debian.org
Tue Jun 23 13:51:40 UTC 2009


Author: pere
Date: 2009-06-23 13:51:39 +0000 (Tue, 23 Jun 2009)
New Revision: 1340

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/initscripts/etc/init.d/umountfs
Log:
Improve init.d/umountfs umount ordering code to avoid being
confused while still solving #391673 (Closes: #529805).  Patch
from Tim Phipps.

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2009-06-23 13:29:46 UTC (rev 1339)
+++ sysvinit/trunk/debian/changelog	2009-06-23 13:51:39 UTC (rev 1340)
@@ -75,6 +75,9 @@
     manual page based on ideas from the sysvconfig package.  Thanks to
     Steve Langasek and Ubuntu.  Add conflict with sysvconfig and
     chkconfig providing the same program.
+  * Improve init.d/umountfs umount ordering code to avoid being
+    confused while still solving #391673 (Closes: #529805).  Patch
+    from Tim Phipps.
 
  -- Kel Modderman <kel at otaku42.de>  Tue, 23 Jun 2009 20:40:49 +1000
 

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/umountfs
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/umountfs	2009-06-23 13:29:46 UTC (rev 1339)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/umountfs	2009-06-23 13:51:39 UTC (rev 1340)
@@ -16,48 +16,6 @@
 
 umask 022
 
-# Print in order of decreasing length
-#
-# Algorithm: Find and print longest argument, then call self
-# to print remaining arguments in order of decreasing length
-#
-# This function runs at one tenth the speed of the sort program
-# but we use the function because we don't want to rely on any
-# programs in /usr/.
-#
-# N.B.: Arguments must not be null and must not contain whitespace
-#
-pioodl() {
-	[ "$1" ] || return 0
-	ARGNUM=1
-	ARGNUM_LONGEST=0
-	ARGLENGTH_LONGEST=0
-	for ARG in "$@"
-	do
-		ARGLENGTH="${#ARG}"
-		if [ "$ARGLENGTH" -gt "$ARGLENGTH_LONGEST" ]
-		then
-			ARGLENGTH_LONGEST="$ARGLENGTH"
-			ARGNUM_LONGEST="$ARGNUM"
-		fi
-		ARGNUM=$(($ARGNUM + 1))
-	done
-	# The method of passing prevargs assumes that args can be
-	# delimited with spaces
-	ARGNUM=1
-	PREVARGS=""
-	while [ "$ARGNUM" -lt "$ARGNUM_LONGEST" ]
-	do
-		PREVARGS="$PREVARGS $1"
-		shift
-		ARGNUM=$(($ARGNUM + 1))
-	done
-	echo "$1"
-	shift
-	pioodl $PREVARGS "$@"
-}
-
-
 do_stop () {
 	exec 9<&0 </proc/mounts
 
@@ -85,10 +43,10 @@
 			continue
 			;;
 		  tmpfs)
-			TMPFS_MTPTS="$TMPFS_MTPTS $MTPT"
+			TMPFS_MTPTS="$MTPT $TMPFS_MTPTS"
 			;;
 		  *)
-			REG_MTPTS="$REG_MTPTS $MTPT"
+			REG_MTPTS="$MTPT $REG_MTPTS"
 			;;
 		esac
 	done
@@ -102,7 +60,6 @@
 	#
 	if [ "$TMPFS_MTPTS" ]
 	then
-		TMPFS_MTPTS="$(pioodl $TMPFS_MTPTS)"
 		if [ "$VERBOSE" = no ]
 		then
 			log_action_begin_msg "Unmounting temporary filesystems"
@@ -134,7 +91,6 @@
 	#
 	if [ "$REG_MTPTS" ]
 	then
-		REG_MTPTS="$(pioodl $REG_MTPTS)"
 		if [ "$VERBOSE" = no ]
 		then
 			log_action_begin_msg "Unmounting local filesystems"




More information about the Pkg-sysvinit-commits mailing list