Skip to content

Commit

Permalink
i-t: don't try to import from empty cache
Browse files Browse the repository at this point in the history
Chases 7c64ee9
 ("zfs-import-{cache,scan}: change condition to FileNotEmpty")

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes openzfs#12108
  • Loading branch information
nabijaczleweli authored and behlendorf committed Jun 8, 2021
1 parent 38eec7d commit ae5dbe5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contrib/initramfs/scripts/zfs
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,8 @@ mountroot()

# ------------
# Look for the cache file (if any).
[ ! -f "${ZPOOL_CACHE}" ] && unset ZPOOL_CACHE
[ -f "${ZPOOL_CACHE}" ] || unset ZPOOL_CACHE
[ -s "${ZPOOL_CACHE}" ] || unset ZPOOL_CACHE

# ------------
# Compatibility: 'ROOT' is for Debian GNU/Linux (etc),
Expand Down

0 comments on commit ae5dbe5

Please sign in to comment.