summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJeff Bailey <jbailey@ubuntu.com>2005-08-26 14:39:14 -0400
committerJeff Bailey <jbailey@ubuntu.com>2005-08-26 14:39:14 -0400
commit7379c1bbf48cfa9df83dc7e92d169e2db37e3bc8 (patch)
tree20c48594c23f0398fb199fc33a1bd07c3cf54bf0 /scripts
parentf0a04306ac01b22e80cbd1d2a7578a1a3efa6e5f (diff)
downloadinitramfs-tools-7379c1bbf48cfa9df83dc7e92d169e2db37e3bc8.tar.gz
initramfs-tools-7379c1bbf48cfa9df83dc7e92d169e2db37e3bc8.zip
initramfs-tools (0.24) breezy; urgency=low
"Experience is simply the name we give out mistakes." - Oscar Wilde * hook-functions (auto_add_modules): Add cciss (Ubuntu #14177) Thanks Fabionne! * scripts/functions (parse_numeric): Noop on empty parameter. Fixes LTSP boot failure. Thanks to Oliver Grawert for testing! * scripts/local-top/md: Don't run modprobe when raidlvl is unset. Run mdadm if raidlvl has ever been set, not just if the most recent device checked was part of the raid setup. Thanks to Jeff Waugh for the bug report! * mkinitramfs: Feed the -o argument through readlink -f to get the canonical pathname. -- Jeff Bailey <jbailey@ubuntu.com> Fri, 26 Aug 2005 09:35:32 -0400
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions4
-rw-r--r--scripts/local-top/md8
2 files changed, 9 insertions, 3 deletions
diff --git a/scripts/functions b/scripts/functions
index 956b1c3..4b3b7cf 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -232,6 +232,9 @@ load_modules()
parse_numeric() {
case $1 in
+ "")
+ return
+ ;;
/*)
return
;;
@@ -248,4 +251,3 @@ parse_numeric() {
mknod /dev/root b ${major} ${minor}
ROOT=/dev/root
}
-
diff --git a/scripts/local-top/md b/scripts/local-top/md
index 055e109..c7515fe 100644
--- a/scripts/local-top/md
+++ b/scripts/local-top/md
@@ -16,6 +16,7 @@ prereqs)
esac
unset raidlvl
+gotraid=n
# Detect raid level
for x in /dev/hd[a-z][0-9]* /dev/sd[a-z][0-9]*; do
@@ -23,9 +24,12 @@ for x in /dev/hd[a-z][0-9]* /dev/sd[a-z][0-9]*; do
continue
fi
raidlvl=$(mdadm --examine ${x} 2>/dev/null | grep "Level" | sed -e 's/.*Raid Level : \(.*\)/\1/')
- modprobe -q ${raidlvl} 2>/dev/null
+ if [ "$raidlvl" ]; then
+ modprobe -q ${raidlvl} 2>/dev/null
+ gotraid=y
+ fi
done
-[ x${raidlvl} != x ] || return
+[ "${gotraid}" = y ] || exit
/sbin/mdrun /dev