[PC-BSD Commits] r2419 - pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts
svn at pcbsd.org
svn at pcbsd.org
Tue Jul 22 14:58:04 PDT 2008
Author: kris
Date: 2008-07-22 14:58:03 -0700 (Tue, 22 Jul 2008)
New Revision: 2419
Modified:
pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountDisk.sh
Log:
Fixed up the ZFS mounting of our install scripts, still needs some work
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-22 21:13:19 UTC (rev 2418)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountDisk.sh 2008-07-22 21:58:03 UTC (rev 2419)
@@ -36,12 +36,16 @@
if [ "$FS" = "ZFS" ]
then
echo "Creating fstab file";
- mount -o rw${MNTOPTS} ${ROOTPART}e${EXTENSION} ${FSMNT} >/dev/null 2>/dev/null
- mkdir ${FSMNT}/etc
- mkdir ${FSMNT}/bootdir
- mount -o rw${MNTOPTS} ${ROOTPART}a${EXTENSION} ${FSMNT}/bootdir >/dev/null 2>/dev/null
- zfs set mountpoint=legacy ${ROOTPART}e
+ ZFSROOTPART="`echo $ROOTPART | cut -d "/" -f 3`"
+ zfs set mountpoint=/mnt ${ZFSROOTPART}e
+ zfs mount -o rw ${ZFSROOTPART}e${EXTENSION}
+ mkdir ${FSMNT}/etc 2>/dev/null
+ mkdir ${FSMNT}/bootdir 2>/dev/null
+ mount -o rw${MNTOPTS} ${ROOTPART}a${EXTENSION} ${FSMNT}/bootdir
+ # MOVE THIS TO UNMOUNT SCRIPT
+ #zfs set mountpoint=legacy ${ZFSROOTPART}e
+
# Create the FSTAB file
echo "# Device Mountpoint FStype Options Dump Pass#
${ROOTPART}b${ENC} none swap sw 0 0
@@ -74,7 +78,7 @@
eval cur_part="\$${varname}"
if [ "${cur_part}" ]
then
- if [ "${cur_part}" != "/" -a "${cur_part}" != "/bootdir" ]
+ if [ "${cur_part}" != "/" -a "${cur_part}" != "/bootdir" -a "$FS" != "ZFS" ]
then
mkdir -p ${FSMNT}${cur_part}
echo "${ROOTPART}${lpart}{EXTENSION} ${cur_part} ufs rw${MNTOPTS} 1 1
@@ -83,10 +87,11 @@
mount -o rw${MNTOPTS} ${ROOTPART}${lpart}{EXTENSION} ${FSMNT}${cur_part}
fi
- if [ "$FS" = "ZFS" -a "${cur_part}" != "/bootdir" ]
+ if [ "$FS" = "ZFS" -a "${cur_part}" != "/" -a "${cur_part}" != "/bootdir" ]
then
# Setup our mount info for ZFS
- zfs set mountpoint=${cur_part} ${ROOTPART}${lpart}
+ zfs set mountpoint=${cur_part} ${ZFSROOTPART}${lpart}
+ zfs mount -o rw ${ZFSROOTPART}${lpart}
fi
fi
done
More information about the Commits
mailing list