From 3a6236e7ba7a060a4daddce8569633763c549412 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Wed, 27 Jul 2005 00:45:30 -0400 Subject: initramfs-tools (0.14) breezy; urgency=low The --- scripts/local-top/md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'scripts/local-top/md') diff --git a/scripts/local-top/md b/scripts/local-top/md index 062852f..48c3ce6 100644 --- a/scripts/local-top/md +++ b/scripts/local-top/md @@ -15,7 +15,14 @@ prereqs) ;; esac -# FIXME detect this! -modprobe raid1 +unset raidlvl + +# Detect raid level +for x in /dev/hd* /dev/sd*; do + raidlvl=$(mdadm --examine ${x} | grep "Level" | sed -e 's/.*Raid Level : \(.*\)/\1/') + modprobe -q ${raidlvl} +done + +[ x${raidlvl} != x ] || return /sbin/mdrun /dev -- cgit v1.2.3