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

svn at pcbsd.org svn at pcbsd.org
Wed Jan 13 14:16:12 PST 2010


Author: kris
Date: 2010-01-13 14:16:12 -0800 (Wed, 13 Jan 2010)
New Revision: 5999

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

Fixed bugs in ZFS install logic, when doing setup with zfs as the root (/) mount point



Modified: pcbsd/trunk/pc-sysinstall/backend/functions-cleanup.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-cleanup.sh	2010-01-13 21:21:29 UTC (rev 5998)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-cleanup.sh	2010-01-13 22:16:12 UTC (rev 5999)
@@ -14,8 +14,8 @@
     then
       if [ "${PARTMNT}" = "/" ]
       then
-        rc_halt "zfs set mountpoint=legacy ${PART}/root"
-        echo "vfs.root.mountfrom=\"zfs:${PART}/root\"" >> ${FSMNT}/boot/loader.conf
+        echo "vfs.root.mountfrom=\"zfs:${PART}\"" >> ${FSMNT}/boot/loader.conf
+        FOUNDZFSROOT="${PART}"
       fi
      FOUNDZFS="1"
     fi
@@ -43,6 +43,11 @@
     cp /etc/hostid ${FSMNT}/etc/hostid
   fi
 
+  if [ ! -z "${FOUNDZFSROOT}" ]
+  then
+    rc_halt "zfs set mountpoint=legacy ${FOUNDZFSROOT}"
+  fi
+
   # Loop through our FS and see if we have any ZFS partitions to cleanup
   for PART in `ls ${PARTDIR}`
   do
@@ -54,9 +59,9 @@
     then
       if [ "${PARTMNT}" != "/" ]
       then
+        rc_halt "zfs set mountpoint=${PARTMNT} ${PART}${PARTMNT}"
         umount ${FSMNT}/${PARTMNT}
         sleep 2
-        rc_halt "zfs set mountpoint=${PARTMNT} ${PART}${PARTMNT}"
       fi
     fi
   done

Modified: pcbsd/trunk/pc-sysinstall/backend/functions-mountdisk.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-mountdisk.sh	2010-01-13 21:21:29 UTC (rev 5998)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-mountdisk.sh	2010-01-13 22:16:12 UTC (rev 5999)
@@ -34,13 +34,13 @@
 
     if [ "${MNTPOINT}" = "/" ]
     then
-      ZNAME="/root"
+      ZNAME=""
     else
       ZNAME="${MNTPOINT}"
+      echo_log "zfs create ${PART}${ZNAME}"
+      rc_halt "zfs create ${PART}${ZNAME}"
+      echo_log "zfs set mountpoint=${FSMNT}${MNTPOINT} ${PART}${ZNAME}"
     fi
-    echo_log "zfs create ${PART}${ZNAME}"
-    rc_halt "zfs create ${PART}${ZNAME}"
-    echo_log "zfs set mountpoint=${FSMNT}${MNTPOINT} ${PART}${ZNAME}"
     sleep 2
     rc_halt "zfs set mountpoint=${FSMNT}${MNTPOINT} ${PART}${ZNAME}"
 



More information about the Commits mailing list