2011-03-17 22:18:13 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
. /lib/dracut-lib.sh
|
|
|
|
|
|
|
|
if [ "$rootfs" = "zfs" ]; then
|
|
|
|
zfsrootfs=`echo "$root" | sed 's|^zfs:||'`
|
|
|
|
zfspool=`echo "$zfsrootfs" | sed 's|/.*||g'`
|
|
|
|
zpool import -N "$zfspool"
|
2011-04-06 16:52:58 +00:00
|
|
|
mount -o zfsutil -t "$rootfs" "$zfsrootfs" "$NEWROOT"
|
|
|
|
if [ "$?" = "0" ]
|
|
|
|
then
|
2011-04-07 20:45:57 +00:00
|
|
|
ROOTFS_MOUNTED=yes
|
2011-04-06 16:52:58 +00:00
|
|
|
else
|
|
|
|
mount -t "$rootfs" "$zfsrootfs" "$NEWROOT" && ROOTFS_MOUNTED=yes
|
|
|
|
fi
|
2011-03-17 22:18:13 +00:00
|
|
|
fi
|