aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdracut/90zfs/mount-zfs.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/dracut/90zfs/mount-zfs.sh b/dracut/90zfs/mount-zfs.sh
index a451bf9f5..52c55a68d 100755
--- a/dracut/90zfs/mount-zfs.sh
+++ b/dracut/90zfs/mount-zfs.sh
@@ -3,6 +3,7 @@
. /lib/dracut-lib.sh
ZPOOL_FORCE=""
+
if getargbool 0 zfs_force -y zfs.force -y zfsforce ; then
warn "ZFS: Will force-import pools if necessary."
ZPOOL_FORCE="-f"
@@ -18,12 +19,12 @@ case "$root" in
# Might be imported by the kernel module, so try searching before
# we import anything.
zfsbootfs=`zpool list -H -o bootfs | sed 'q'`
- if [ "$zfsbootfs" = "" ] ; then
+ if [ "$?" != "0" ] || [ "$zfsbootfs" = "" ] || [ "$zfsbootfs" = "no pools available" ] ; then
# Not there, so we need to import everything.
info "ZFS: Attempting to import additional pools."
zpool import -N -a ${ZPOOL_FORCE}
zfsbootfs=`zpool list -H -o bootfs | sed 'q'`
- if [ "$zfsbootfs" = "" ] ; then
+ if [ "$?" != "0" ] || [ "$zfsbootfs" = "" ] || [ "$zfsbootfs" = "no pools available" ] ; then
rootok=0
pool=""