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

svn at pcbsd.org svn at pcbsd.org
Wed Jul 23 07:44:25 PDT 2008


Author: kris
Date: 2008-07-23 07:44:25 -0700 (Wed, 23 Jul 2008)
New Revision: 2421

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

Updated the MountDisk.sh script with some more ZFS improvments, more to
follow



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-23 13:24:59 UTC (rev 2420)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountDisk.sh	2008-07-23 14:44:25 UTC (rev 2421)
@@ -36,11 +36,22 @@
 if [ "$FS" = "ZFS" ]
 then
   echo "Creating fstab file";
+
+  # Lets make our savedir for the real mount points used after install
+  mkdir /uzip/zfsmnts
+
+  # Get the raw ZFSROOTPART name, and mount it
   ZFSROOTPART="`echo $ROOTPART | cut -d "/" -f 3`"
   zfs set mountpoint=/mnt ${ZFSROOTPART}e 
   zfs mount -o rw ${ZFSROOTPART}e${EXTENSION}
+
+  echo "legacy" > /uzip/zfsmnts/${ZFSROOTPART}e
+
+  # Create some directories on the ZFS partition
   mkdir ${FSMNT}/etc 2>/dev/null
   mkdir ${FSMNT}/bootdir 2>/dev/null
+
+  # Mount partition "a" which is UFS to our mount /bootdir
   mount -o rw${MNTOPTS} ${ROOTPART}a${EXTENSION} ${FSMNT}/bootdir
 
   # MOVE THIS TO UNMOUNT SCRIPT
@@ -89,9 +100,14 @@
 
    if [ "$FS" = "ZFS" -a "${cur_part}" != "/" -a "${cur_part}" != "/bootdir" ]
    then
-      # Setup our mount info for ZFS 
-      zfs set mountpoint=${cur_part} ${ZFSROOTPART}${lpart}
+
+      # Mount our next partition with ZFS
+      zfs set mountpoint=/mnt/${cur_part} ${ZFSROOTPART}${lpart}
       zfs mount -o rw ${ZFSROOTPART}${lpart}
+
+      # Save the real mount point for this partition for usage after install
+      echo "${cut_part}" > /uzip/zfsmnts/${ZFSROOTPART}${lpart}
+
    fi
   fi
 done



More information about the Commits mailing list