From f811f9723ffd2554ea5b07b20e602ec9f1e95c31 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sat, 8 Sep 2018 12:06:54 +0200 Subject: [PATCH] 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. --- src/sbin/opnsense-importer | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/sbin/opnsense-importer b/src/sbin/opnsense-importer index 0f2df10e4..f937af09a 100755 --- a/src/sbin/opnsense-importer +++ b/src/sbin/opnsense-importer @@ -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 }