[PC-BSD Commits] r5819 - pcbsd/trunk/pc-sysinstall/backend
svn at pcbsd.org
svn at pcbsd.org
Thu Jan 7 06:58:47 PST 2010
Author: kris
Date: 2010-01-07 06:58:47 -0800 (Thu, 07 Jan 2010)
New Revision: 5819
Modified:
pcbsd/trunk/pc-sysinstall/backend/functions-cleanup.sh
pcbsd/trunk/pc-sysinstall/backend/functions-unmount.sh
Log:
Updated the location of when we run ZFS unmounting, and only start doing so once all writes to the FSMNT
are finished
Modified: pcbsd/trunk/pc-sysinstall/backend/functions-cleanup.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-cleanup.sh 2010-01-07 10:04:31 UTC (rev 5818)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-cleanup.sh 2010-01-07 14:58:47 UTC (rev 5819)
@@ -2,25 +2,20 @@
# Functions which perform the final cleanup after an install
# Finishes up with ZFS setup before unmounting
-zfs_cleanup()
+zfs_cleanup_unmount()
{
+
# Loop through our FS and see if we have any ZFS partitions to cleanup
for PART in `ls ${PARTDIR}`
do
PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`"
PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`"
- PARTENC="`cat ${PARTDIR}/${PART} | cut -d ':' -f 3`"
-
if [ "$PARTFS" = "ZFS" ]
then
if [ "${PARTMNT}" = "/" ]
then
rc_halt "zfs set mountpoint=legacy ${PART}/root"
echo "vfs.root.mountfrom=\"zfs:${PART}/root\"" >> ${FSMNT}/boot/loader.conf
- else
- umount ${FSMNT}/${PARTMNT}
- sleep 2
- rc_halt "zfs set mountpoint=${PARTMNT} ${PART}${PARTMNT}"
fi
FOUNDZFS="1"
fi
@@ -48,7 +43,24 @@
cp /etc/hostid ${FSMNT}/etc/hostid
fi
+ # Loop through our FS and see if we have any ZFS partitions to cleanup
+ for PART in `ls ${PARTDIR}`
+ do
+ PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`"
+ PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`"
+ PARTENC="`cat ${PARTDIR}/${PART} | cut -d ':' -f 3`"
+ if [ "$PARTFS" = "ZFS" ]
+ then
+ if [ "${PARTMNT}" != "/" ]
+ then
+ umount ${FSMNT}/${PARTMNT}
+ sleep 2
+ rc_halt "zfs set mountpoint=${PARTMNT} ${PART}${PARTMNT}"
+ fi
+ fi
+ done
+
};
# Function which creates the /etc/fstab for the installed system
@@ -288,7 +300,4 @@
# Set the root_pw if it is specified
set_root_pw
- # Check if we need to setup any ZFS - DO THIS LAST
- zfs_cleanup
-
};
Modified: pcbsd/trunk/pc-sysinstall/backend/functions-unmount.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-unmount.sh 2010-01-07 10:04:31 UTC (rev 5818)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-unmount.sh 2010-01-07 14:58:47 UTC (rev 5819)
@@ -22,6 +22,10 @@
# Unmounts all our mounted file-systems
unmount_all_filesystems()
{
+
+ # Start by unmounting any ZFS partitions
+ zfs_cleanup_unmount
+
# Copy the logfile to disk before we unmount
cp ${LOGOUT} ${FSMNT}/pc-sysinstall.log
cd /
More information about the Commits
mailing list