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

svn at pcbsd.org svn at pcbsd.org
Thu Jul 24 08:36:30 PDT 2008


Author: kris
Date: 2008-07-24 08:36:29 -0700 (Thu, 24 Jul 2008)
New Revision: 2441

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

Fixed ZFS with multiple partitions, 



Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountDisk.sh
===================================================================
--- pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountDisk.sh	2008-07-24 15:14:17 UTC (rev 2440)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountDisk.sh	2008-07-24 15:36:29 UTC (rev 2441)
@@ -74,18 +74,29 @@
 ##
 # Check for any extra mount points and do it now
 ##
-part_d=${3}
-part_e=${4}
-part_f=${5}
-part_g=${6}
-part_h=${7}
+if [ "$FS" = "ZFS" ]
+then
+  part_f=${3}
+  part_g=${4}
+  part_h=${5}
+else
+  part_d=${3}
+  part_e=${4}
+  part_f=${5}
+  part_g=${6}
+  part_h=${7}
+fi
 
+
+
 for lpart in `echo "d e f g h"`
 do
   eval varname="part_${lpart}"
   eval cur_part="\$${varname}"
   if [ "${cur_part}" ]
   then
+
+   # Do the creation for regular UFS2 partitions
    if [ "${cur_part}" != "/" -a "${cur_part}" != "/bootdir" -a "$FS" != "ZFS" ]
    then
      mkdir -p ${FSMNT}${cur_part}
@@ -95,12 +106,13 @@
      mount -o rw${MNTOPTS} ${ROOTPART}${lpart}{EXTENSION} ${FSMNT}${cur_part}
    fi
 
+   # Check if we are on ZFS and create the partitions for it
    if [ "$FS" = "ZFS" -a "${cur_part}" != "/" -a "${cur_part}" != "/bootdir" ]
    then
 
       # Mount our next partition with ZFS
-      zfs create ${ZFSROOTPART}${lpart}/${cur_part}
-      zfs set mountpoint=/mnt/${cur_part} ${ZFSROOTPART}${lpart}/${cur_part}
+      zfs create ${ZFSROOTPART}${lpart}${cur_part}
+      zfs set mountpoint=/mnt/${cur_part} ${ZFSROOTPART}${lpart}${cur_part}
 
       # Save the real mount point for this partition for usage after install
       echo "${cur_part}" > /uzip/zfsmnts/${ZFSROOTPART}${lpart}



More information about the Commits mailing list