summaryrefslogtreecommitdiffstats
path: root/install/autodetect
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2010-02-07 14:34:01 +0100
committerThomas Bächler <thomas@archlinux.org>2010-02-07 14:34:01 +0100
commit0d7759576490af59d7fc54871495ef8bca9e56aa (patch)
tree8c0c5483a1966f70d05ce6f353cf85c679e3f467 /install/autodetect
parentc4dbe4cb2d740172f1199e8f3af23709477ea0de (diff)
downloadmkinitcpio-0d7759576490af59d7fc54871495ef8bca9e56aa.tar.gz
mkinitcpio-0d7759576490af59d7fc54871495ef8bca9e56aa.tar.xz
Allow a filesystem name to be an alias instead of a kernel module
This fixes future bugs in 2.6.33 when the ext4 driver is used for ext3 and ext2, and you want to mount ext2/3 as your root filesystem
Diffstat (limited to 'install/autodetect')
-rw-r--r--install/autodetect11
1 files changed, 7 insertions, 4 deletions
diff --git a/install/autodetect b/install/autodetect
index 0010da3..adfee9f 100644
--- a/install/autodetect
+++ b/install/autodetect
@@ -20,10 +20,13 @@ install ()
if [ ${UID} -eq 0 -o "$(groups | grep disk)" != "" ]; then
for fs in $(findfs | sort | uniq); do
- for mod in $(find "${MODULEDIR}" -type f -name "${fs}.ko"); do
- if [ -n "${mod}" ]; then
- AUTODETECT="${AUTODETECT} ${mod}"
- fi
+ allfs="${fs} $(modprobe --resolve-alias ${fs})"
+ for mod in ${allfs}; do
+ for modfile in $(find "${MODULEDIR}" -type f -name "${mod}.ko"); do
+ if [ -n "${modfile}" ]; then
+ AUTODETECT="${AUTODETECT} ${modfile}"
+ fi
+ done
done
done