summaryrefslogtreecommitdiffstats
path: root/install/autodetect
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2007-01-11 20:03:25 +0100
committerThomas Bächler <thomas@archlinux.org>2007-01-11 20:03:25 +0100
commit184cc440ced65cba8c6113c4739acbf0d511320f (patch)
treecf009c83103f3c860cd60320257cc4945ba3f948 /install/autodetect
parent41d00818ead4d43ee6dd07e5c9c4690a1f3faeeb (diff)
downloadmkinitcpio-184cc440ced65cba8c6113c4739acbf0d511320f.tar.gz
mkinitcpio-184cc440ced65cba8c6113c4739acbf0d511320f.tar.xz
fixed raid autodetection for newer kernels
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@191 880c04e9-e011-0410-abf7-b926e227c9cd
Diffstat (limited to 'install/autodetect')
-rw-r--r--install/autodetect16
1 files changed, 11 insertions, 5 deletions
diff --git a/install/autodetect b/install/autodetect
index a743601..e52220e 100644
--- a/install/autodetect
+++ b/install/autodetect
@@ -8,7 +8,7 @@ install ()
-e '/usb/' -e '/ide/' -e '/ieee1394/' -e '/cdrom' \
-e '/net/' -e '/pcmcia' -e '/ata')"
-
+
#Filesystem detection, use sysfs instead of /proc
findfs ()
{
@@ -19,7 +19,7 @@ install ()
fi
done
}
-
+
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
@@ -30,9 +30,15 @@ install ()
done
if [ -e /sbin/mdadm ]; then
- AUTODETECT="$AUTODETECT
- $(mdadm -E -s /dev/hd* /dev/sd* /dev/rd/* /dev/ida/* /dev/cciss/* /dev/ataraid/* \
- | awk -Flevel= '{print $2}' | awk '{print $1}')"
+ for raidmod in $(mdadm -E -s /dev/hd* /dev/sd* /dev/rd/* /dev/ida/* /dev/cciss/* /dev/ataraid/* \
+ | awk -Flevel= '{print $2}' | awk '{print $1}'); do
+ case "${raidmod}" in
+ raid4|raid5|raid6)
+ AUTODETECT="${AUTODETECT} raid456" ;;
+ *)
+ AUTODETECT="${AUTODETECT} ${raidmod}" ;;
+ esac
+ done
fi
else
err "User does not have proper permissions to read superblocks, raid and filesystem modules are not detected"