X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=dracut%2F90zfs%2Fmount-zfs.sh;h=49d68466c556b6e3db65ca5c91a85b88150dba08;hb=7f4afd300b753ee7e0ce1f8d12c098119193001b;hp=a451bf9f52df86fc56461c3a65f304386d526e0e;hpb=1ef5e8296a07a0d208d0663ae966c8b0206f7e6a;p=zfs.git diff --git a/dracut/90zfs/mount-zfs.sh b/dracut/90zfs/mount-zfs.sh index a451bf9..49d6846 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,14 @@ 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=""