summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJeff Bailey <jbailey@ubuntu.com>2005-08-16 13:34:13 -0400
committerJeff Bailey <jbailey@ubuntu.com>2005-08-16 13:34:13 -0400
commit618760b004d07efb11f05e57d46ed4b5adb2823c (patch)
tree196895455a2d38f79e6e742786cccd0b9636f8fe /scripts
parent3d319f70b29f804234fa5eb6e93c1168b0d2dddf (diff)
downloadinitramfs-tools-618760b004d07efb11f05e57d46ed4b5adb2823c.tar.gz
initramfs-tools-618760b004d07efb11f05e57d46ed4b5adb2823c.zip
Cleanup commit, sorry for the mess
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions16
-rw-r--r--scripts/local-top/md9
2 files changed, 21 insertions, 4 deletions
diff --git a/scripts/functions b/scripts/functions
index cf9f4a7..10918f8 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -194,7 +194,7 @@ load_modules()
then
continue;
else
- modprobe -v $m
+ modprobe -q $m
fi
done
fi
@@ -219,4 +219,18 @@ load_modules()
scsi_boot_events
}
+parse_numeric() {
+ case $1 in
+ *:*)
+ minor=${1#*:}
+ major=${1%:*}
+ ;;
+ *)
+ minor=$((0x${1#??}))
+ major=$((0x${1%??}))
+ ;;
+ esac
+
+ mknod /dev/root b ${major} ${minor}
+}
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