i-t: don't try to import from empty cache

Chases 7c64ee9e77
 ("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
This commit is contained in:
наб 2021-05-26 13:13:08 +02:00 committed by Brian Behlendorf
parent 11b165cc9b
commit b12a6d961c
1 changed files with 2 additions and 1 deletions

View File

@ -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),