summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--functions10
-rw-r--r--install/autodetect5
2 files changed, 9 insertions, 6 deletions
diff --git a/functions b/functions
index 4bdb27e..ef066ba 100644
--- a/functions
+++ b/functions
@@ -15,7 +15,7 @@ auto_modules ()
all_modules ()
{
- mods=$(find ${MODULEDIR} -name '*.ko' 2>/dev/null | grep $@ | sort -u)
+ mods=$(find ${MODULEDIR} -name '*.ko' -or -name '*.ko.gz' 2>/dev/null | grep $@ | sort -u)
echo "${mods}"
[ -z "${mods}" ] && return 1
@@ -26,7 +26,8 @@ checked_modules ()
{
if [ -e "${MODULE_FILE}" ]; then
for mod in $(all_modules $@); do
- modname="$(basename ${mod%.ko} | tr '-' '_')"
+ modname=${mod%.gz}
+ modname="$(basename ${modname%.ko} | tr '-' '_')"
if grep "^${modname}$" "${MODULE_FILE}" >/dev/null 2>&1; then
echo ${modname}
fi
@@ -147,12 +148,13 @@ add_module ()
{
local m fil path fw mod deps
#cleanup - remove .ko, replace - with _
- m=$(basename "${1%.ko}" | tr '-' '_')
+ m=${1%.gz}
+ m=$(basename "${m%.ko}" | tr '-' '_')
#find pattern - replace _ with [-_] to match either
fil=$(echo "$m" | sed 's|_|\[-_\]|g')
found=0
- for path in $(find "${MODULEDIR}" -type f -name "${fil}.ko"); do
+ for path in $(find "${MODULEDIR}" -type f -name "${fil}.ko" -or -name "${fil}.ko.gz"); do
#get needed firmware files
for fw in $(/sbin/modinfo -F firmware "${path}"); do
[ -f "/lib/firmware/$fw" ] && add_file "/lib/firmware/$fw"
diff --git a/install/autodetect b/install/autodetect
index 82dca3c..5c86eb0 100644
--- a/install/autodetect
+++ b/install/autodetect
@@ -28,7 +28,7 @@ install ()
for fs in ${fss}; do
allfs="${fs} $(modprobe --set-version ${KERNELVERSION} --resolve-alias ${fs})"
for mod in ${allfs}; do
- for modfile in $(find "${MODULEDIR}" -type f -name "${mod}.ko"); do
+ for modfile in $(find "${MODULEDIR}" -type f -name "${mod}.ko" -or -name "${mod}.ko.gz"); do
if [ -n "${modfile}" ]; then
AUTODETECT="${AUTODETECT} ${modfile}"
fi
@@ -54,7 +54,8 @@ install ()
fi
for m in ${AUTODETECT}; do
- modname="$(basename ${m%.ko})"
+ modname="${m%.gz}"
+ modname="$(basename ${modname%.ko})"
echo "${modname}" >> "${MODULE_FILE}"
done