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 #12108
  • Loading branch information
nabijaczleweli authored and behlendorf committed Jun 4, 2021
1 parent a0242ec commit 2ba7a9e
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 @@ -706,7 +706,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 2ba7a9e

Please sign in to comment.