diff options
Diffstat (limited to 'scripts/common.sh.in')
-rw-r--r-- | scripts/common.sh.in | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/common.sh.in b/scripts/common.sh.in index 09ca818c3..2583efcb2 100644 --- a/scripts/common.sh.in +++ b/scripts/common.sh.in @@ -11,7 +11,8 @@ SCRIPT_CONFIG=zfs-script-config.sh if [ -f "${basedir}/../${SCRIPT_CONFIG}" ]; then . "${basedir}/../${SCRIPT_CONFIG}" else -MODULES=(zlib_deflate spl splat zavl znvpair zunicode zcommon zfs) +KERNEL_MODULES=(zlib_deflate zlib_inflate) +MODULES=(spl splat zavl znvpair zunicode zcommon zfs) fi PROG="<define PROG>" @@ -162,7 +163,7 @@ load_module() { echo "Loading ${NAME} ($@)" fi - ${LDMOD} $* || ERROR="Failed to load $1" return 1 + ${LDMOD} $* &>/dev/null || ERROR="Failed to load $1" return 1 return 0 } @@ -170,6 +171,10 @@ load_module() { load_modules() { mkdir -p /etc/zfs + for MOD in ${KERNEL_MODULES[*]}; do + load_module ${MOD} + done + for MOD in ${MODULES[*]}; do local NAME=`basename ${MOD} .ko` local VALUE= |