diff options
author | Jeff Bailey <jbailey@ubuntu.com> | 2005-08-16 13:34:13 -0400 |
---|---|---|
committer | Jeff Bailey <jbailey@ubuntu.com> | 2005-08-16 13:34:13 -0400 |
commit | 618760b004d07efb11f05e57d46ed4b5adb2823c (patch) | |
tree | 196895455a2d38f79e6e742786cccd0b9636f8fe /scripts/local-top/md | |
parent | 3d319f70b29f804234fa5eb6e93c1168b0d2dddf (diff) | |
download | initramfs-tools-618760b004d07efb11f05e57d46ed4b5adb2823c.tar.gz initramfs-tools-618760b004d07efb11f05e57d46ed4b5adb2823c.zip |
Cleanup commit, sorry for the mess
Diffstat (limited to 'scripts/local-top/md')
-rw-r--r-- | scripts/local-top/md | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/local-top/md b/scripts/local-top/md index 48c3ce6..055e109 100644 --- a/scripts/local-top/md +++ b/scripts/local-top/md @@ -18,9 +18,12 @@ esac 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} +for x in /dev/hd[a-z][0-9]* /dev/sd[a-z][0-9]*; do + if [ ! -e ${x} ]; then + continue + fi + raidlvl=$(mdadm --examine ${x} 2>/dev/null | grep "Level" | sed -e 's/.*Raid Level : \(.*\)/\1/') + modprobe -q ${raidlvl} 2>/dev/null done [ x${raidlvl} != x ] || return |