/etc/zfs/zpool.cache is the preferred (and new) location of zpool.cache.

Check for it first. Only use /boot/zfs/zpool.cache if the /etc/zfs
version is not found and good.

Reported by:	avg
Suggested by:	avg, kevans
This commit is contained in:
Cy Schubert 2020-08-27 14:33:46 +00:00
parent cd568e2b1b
commit a784185078

View File

@ -20,9 +20,9 @@ zpool_start()
{
local cachefile
for cachefile in /boot/zfs/zpool.cache /etc/zfs/zpool.cache; do
for cachefile in /etc/zfs/zpool.cache /boot/zfs/zpool.cache; do
if [ -r $cachefile ]; then
zpool import -c $cachefile -a -N
zpool import -c $cachefile -a -N && break
fi
done
}