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 a0242eceff
commit 2ba7a9e5cc
1 changed files with 2 additions and 1 deletions

View File

@ -706,7 +706,8 @@ mountroot()
# ------------ # ------------
# Look for the cache file (if any). # 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), # Compatibility: 'ROOT' is for Debian GNU/Linux (etc),