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

svn at pcbsd.org svn at pcbsd.org
Mon Mar 1 08:23:16 PST 2010


Author: kris
Date: 2010-03-01 08:23:16 -0800 (Mon, 01 Mar 2010)
New Revision: 6310

Modified:
   pcbsd/trunk/pc-sysinstall/backend/functions-bsdlabel.sh
Log:

Fixed some bugs with the new pc-sysinstall GPT / ZFS enhancements



Modified: pcbsd/trunk/pc-sysinstall/backend/functions-bsdlabel.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-bsdlabel.sh	2010-02-28 10:01:22 UTC (rev 6309)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-bsdlabel.sh	2010-03-01 16:23:16 UTC (rev 6310)
@@ -53,7 +53,9 @@
 
   DISKTAG="$1"
   WRKSLICE="$2"
+  FOUNDPARTS="1"
 
+
   # Lets setup the BSDLABEL
   BSDLABEL="${TMPDIR}/bsdLabel-${WRKSLICE}"
   export BSDLABEL
@@ -74,6 +76,7 @@
       # Found a slice- entry, lets get the slice info
       get_value_from_string "${line}"
       STRING="$VAL"
+      FOUNDPARTS="0"
 
       # We need to split up the string now, and pick out the variables
       FS=`echo $STRING | tr -s '\t' ' ' | cut -d ' ' -f 1` 
@@ -172,7 +175,7 @@
     fi # End of subsection locating a slice in config
 
     echo $line | grep "^commitDiskLabel" >/dev/null 2>/dev/null
-    if [ "$?" = "0" ]
+    if [ "$?" = "0" -a "${FOUNDPARTS}" = "0" ]
     then
       # Found our flag to commit this label setup, check that we found at least 1 partition and do it
       if [ "${PARTLETTER}" != "a" ]
@@ -199,6 +202,7 @@
 {
   DISKTAG="$1"
   DISK="$2"
+  FOUNDPARTS="1"
 
   # Lets read in the config file now and setup our GPT partitions
   CURPART="2"
@@ -299,7 +303,7 @@
     fi # End of subsection locating a slice in config
 
     echo $line | grep "^commitDiskLabel" >/dev/null 2>/dev/null
-    if [ "$?" = "0" ]
+    if [ "$?" = "0" -a "${FOUNDPARTS}" = "0" ]
     then
 
       # If this is the boot disk, stamp the right gptboot
@@ -315,6 +319,8 @@
       if [ "${CURPART}" = "2" ] ; then
         exit_err "ERROR: commitDiskLabel was called without any partition entries for it!"
       fi
+
+      break
     fi
   done <${CFGF}
 };



More information about the Commits mailing list