rc: explicity tell to unload

Otherwise we try to unload when it's there.  Logic was
correct but -b assumtion was incorrect as we do not touch
drivers there or require any pool listing.
This commit is contained in:
Franco Fichtner 2018-09-08 12:06:54 +02:00
parent 51d324013e
commit f811f9723f

View File

@ -114,9 +114,8 @@ timeout_prompt()
zfs_load()
{
# we need to load ZFS to list pools
if kldstat -qm zfs; then
export ZFS="yes"
else
if ! kldstat -qm zfs; then
export UNLOAD_ZFS="yes"
kldload zfs
fi
@ -130,7 +129,7 @@ zfs_load()
zfs_unload()
{
if [ -z "${ZFS}" ]; then
if [ -n "${UNLOAD_ZFS}" ]; then
kldunload zfs
fi
}