Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Unconditionally load core kernel modules

Loading and unloading the zlib modules was part of the zfs.sh.
Fix was taken from following  Brian's commit
cf47fad
  • Loading branch information...
commit 4abda81668f2e0b922b883a23090cde9662a0854 1 parent 5990e26
@nkhare nkhare authored
Showing with 8 additions and 3 deletions.
  1. +7 −2 scripts/common.sh.in
  2. +1 −1  zfs-script-config.sh.in
View
9 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>"
@@ -157,7 +158,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
}
@@ -165,6 +166,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=
View
2  zfs-script-config.sh.in
@@ -39,6 +39,7 @@ LDMOD=/sbin/insmod
KERNEL_MODULES=( \
${KERNELMOD}/lib/zlib_deflate/zlib_deflate.ko \
+ ${KERNELMOD}/lib/zlib_deflate/zlib_inflate.ko \
)
SPL_MODULES=( \
@@ -59,7 +60,6 @@ ZPIOS_MODULES=( \
)
MODULES=( \
- ${KERNEL_MODULES[*]} \
${SPL_MODULES[*]} \
${ZFS_MODULES[*]} \
)
Please sign in to comment.
Something went wrong with that request. Please try again.