summaryrefslogtreecommitdiffstats
path: root/install/autodetect
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2011-01-25 20:59:47 +0100
committerThomas Bächler <thomas@archlinux.org>2011-01-25 21:02:38 +0100
commit692a44574241c32e213f48884a653a9535021091 (patch)
tree90ee91c7b6f1347c1863c5cff2aea1bcc4796224 /install/autodetect
parent1c9a57232165a2b48678848e739a14d0bd2687b3 (diff)
downloadmkinitcpio-692a44574241c32e213f48884a653a9535021091.tar.gz
mkinitcpio-692a44574241c32e213f48884a653a9535021091.tar.xz
Support .ko.gz kernel modules, in addition to .ko
We used to expect only .ko as a kernel module name. Also accept .ko.gz, so we can reduce the installed size of the kernel26 package.
Diffstat (limited to 'install/autodetect')
-rw-r--r--install/autodetect5
1 files changed, 3 insertions, 2 deletions
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