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 <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#12108
  • Loading branch information
nabijaczleweli authored and behlendorf committed Jun 8, 2021
1 parent fcb91ba commit 7fbe38a
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 7fbe38a

Please sign in to comment.