Permit both mountpoint=legacy and mountpoint=/ in initrd

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Manuel Amador (Rudd-O) 2011-04-06 09:52:58 -07:00 committed by Brian Behlendorf
parent 8610b52bd4
commit 6583dcacdc

View File

@ -6,5 +6,11 @@ if [ "$rootfs" = "zfs" ]; then
zfsrootfs=`echo "$root" | sed 's|^zfs:||'`
zfspool=`echo "$zfsrootfs" | sed 's|/.*||g'`
zpool import -N "$zfspool"
mount -o zfsutil -t "$rootfs" "$zfsrootfs" "$NEWROOT" && ROOTFS_MOUNTED=yes
mount -o zfsutil -t "$rootfs" "$zfsrootfs" "$NEWROOT"
if [ "$?" = "0" ]
then
ROOTFS_MOUNTED=yes
else
mount -t "$rootfs" "$zfsrootfs" "$NEWROOT" && ROOTFS_MOUNTED=yes
fi
fi