Align closing fi in mount-zfs.sh
[zfs.git] / dracut / 90zfs / mount-zfs.sh
index 6b742e3..b4a4de6 100755 (executable)
@@ -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