[PC-BSD Commits] r6302 - pcbsd/trunk/pc-sysinstall/backend-query

svn at pcbsd.org svn at pcbsd.org
Thu Feb 25 09:45:02 PST 2010


Author: kris
Date: 2010-02-25 09:45:02 -0800 (Thu, 25 Feb 2010)
New Revision: 6302

Modified:
   pcbsd/trunk/pc-sysinstall/backend-query/update-part-list.sh
Log:

Found bug with some file-systems not getting unmounted properly in update check, create nice loop
to go through and unmount each one-by-one, since umount -a doesn't do the job



Modified: pcbsd/trunk/pc-sysinstall/backend-query/update-part-list.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend-query/update-part-list.sh	2010-02-25 16:13:28 UTC (rev 6301)
+++ pcbsd/trunk/pc-sysinstall/backend-query/update-part-list.sh	2010-02-25 17:45:02 UTC (rev 6302)
@@ -63,8 +63,9 @@
       PART="${i}"
 
       mount -t devfs devfs ${FSMNT}/dev
-      chroot ${FSMNT} /sbin/mount -a >>${LOGOUT} 2>>${LOGOUT}
 
+      chroot ${FSMNT} /sbin/mount -a
+
       # Now lets see what type of system we've found here
       # Create Script
       echo '#!/bin/sh
@@ -110,8 +111,19 @@
 
       # Unmount FS
       chroot ${FSMNT} /sbin/umount -a >/dev/null 2>/dev/null
-      umount -f ${FSMNT}/usr >/dev/null 2>/dev/null
-      umount -f ${FSMNT}/var >/dev/null 2>/dev/null
+
+      mount | tail -r > /tmp/.upmounts 
+      while read line
+      do
+        UMNT="`echo $line | cut -d ' ' -f 1`"  
+        if [ "${UMNT}" = "devfs" ] ; then
+          break
+        fi
+      
+        umount -f ${UMNT}
+      done < /tmp/.upmounts
+      rm /tmp/.upmounts
+
       umount -f ${FSMNT}/proc >/dev/null 2>/dev/null
       umount -f ${FSMNT}/compat/linux/proc >/dev/null 2>/dev/null
       umount -f ${FSMNT}/dev >/dev/null 2>/dev/null



More information about the Commits mailing list