[PC-BSD Commits] r3723 - pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts

svn at pcbsd.org svn at pcbsd.org
Wed Apr 1 05:56:25 PST 2009


Author: kris
Date: 2009-04-01 06:56:24 -0700 (Wed, 01 Apr 2009)
New Revision: 3723

Modified:
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh
Log:

Updated our mounting script for upgrades to run "fsck" on regular UFS partitions before mounting, in case the user left us
with a dirty partition



Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh
===================================================================
--- pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh	2009-04-01 13:00:22 UTC (rev 3722)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh	2009-04-01 13:56:24 UTC (rev 3723)
@@ -6,12 +6,15 @@
 
 PART=${1}
 # Check for .journal extensions
-ls ${PART}${i}a.journal >/dev/null 2>/dev/null
+ls ${PART}a.journal >/dev/null 2>/dev/null
 if [ "$?" = "0" ]
 then
-  mount ${PART}${i}a.journal ${FSMNT}${MNT} >/dev/null 2>/dev/null
+  mount ${PART}a.journal ${FSMNT}${MNT} >/dev/null 2>/dev/null
 else
-  mount ${PART}${i}a ${FSMNT}${MNT} >/dev/null 2>/dev/null
+  # First scan the partition with fsck, make sure its clean
+  echo "Scanning partition ${PART}a. This may take a while..."
+  fsck -y ${PART}a >/dev/null 2>/dev/null
+  mount ${PART}a ${FSMNT}${MNT} >/dev/null 2>/dev/null
 fi
 
 
@@ -30,6 +33,9 @@
     then
       mount ${PART}${i}.journal ${FSMNT}${MNT} >/dev/null 2>/dev/null
     else
+      # First scan the partition with fsck, make sure its clean
+      echo "Scanning partition ${PART}${i}. This may take a while..."
+      fsck -y ${PART}${i} >/dev/null 2>/dev/null
       mount ${PART}${i} ${FSMNT}${MNT} >/dev/null 2>/dev/null
     fi
 



More information about the Commits mailing list