Changeset View
Changeset View
Standalone View
Standalone View
libexec/rc/rc.d/zpool
Show All 16 Lines | |||||
required_modules="zfs" | required_modules="zfs" | ||||
zpool_start() | zpool_start() | ||||
{ | { | ||||
local cachefile | local cachefile | ||||
for cachefile in /etc/zfs/zpool.cache /boot/zfs/zpool.cache; do | for cachefile in /etc/zfs/zpool.cache /boot/zfs/zpool.cache; do | ||||
if [ -r $cachefile ]; then | if [ -r $cachefile ]; then | ||||
zpool import -c $cachefile -a -N && break | zpool import -c $cachefile -a -N | ||||
if [ $? -ne 0 ]; then | |||||
echo "Import of zpool cache ${cachefile} failed," \ | |||||
"will retry after root mount hold release" | |||||
root_hold_wait | |||||
zpool import -c $cachefile -a -N | |||||
fi | |||||
break | |||||
fi | fi | ||||
done | done | ||||
} | } | ||||
load_rc_config $name | load_rc_config $name | ||||
run_rc_command "$1" | run_rc_command "$1" |