aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/common.sh.in8
-rwxr-xr-xscripts/zfs.sh4
2 files changed, 8 insertions, 4 deletions
diff --git a/scripts/common.sh.in b/scripts/common.sh.in
index a6586f4aa..2fac2a919 100644
--- a/scripts/common.sh.in
+++ b/scripts/common.sh.in
@@ -207,7 +207,11 @@ load_module() {
echo "Loading ${NAME} ($@)"
fi
- ${LDMOD} $* &>/dev/null || ERROR="Failed to load $1" return 1
+ ${LDMOD} $* &>/dev/null
+ if [ $? -ne 0 ]; then
+ echo "Failed to load ${NAME} ($@)"
+ return 1
+ fi
return 0
}
@@ -216,7 +220,7 @@ load_modules() {
mkdir -p /etc/zfs
for MOD in ${KERNEL_MODULES[*]}; do
- load_module ${MOD}
+ load_module ${MOD} >/dev/null
done
for MOD in ${MODULES[*]}; do
diff --git a/scripts/zfs.sh b/scripts/zfs.sh
index b21d2e7cf..b97a0577f 100755
--- a/scripts/zfs.sh
+++ b/scripts/zfs.sh
@@ -72,8 +72,8 @@ if [ ${UNLOAD} ]; then
else
stack_clear
check_modules || die "${ERROR}"
- load_modules "$@"
- wait_udev /dev/zfs 30
+ load_modules "$@" || die "Failed to load modules"
+ wait_udev /dev/zfs 30 || die "'/dev/zfs' was not created"
fi
exit 0