diff options
author | maximilian attems <maks@debian.org> | 2008-05-30 14:05:22 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2008-05-30 14:05:22 +0200 |
commit | a1ba5db6eec1c8181a2a06500479a22eae242afa (patch) | |
tree | c1f31e434b93c1b551829933117feadfcce58439 | |
parent | 3d2a4940078b2cf041fed35233449e7cd6e57a0a (diff) | |
download | initramfs-tools-a1ba5db6eec1c8181a2a06500479a22eae242afa.tar.gz initramfs-tools-a1ba5db6eec1c8181a2a06500479a22eae242afa.zip |
update-initramfs: mbr_check() fix for /dev/md/X naming (closes: #469312)
update-initramfs: Generating /boot/initrd.img-2.6.22-3-k7
awk: /^md/2/{print substr($5, 1, 3)}
thuse the initramfs will not be generated properly
-rwxr-xr-x | update-initramfs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/update-initramfs b/update-initramfs index 90a66b4..6f978f3 100755 --- a/update-initramfs +++ b/update-initramfs @@ -201,6 +201,13 @@ mbr_check() boot=$(awk -F = '/^boot=/{ print $2}' /etc/lilo.conf) [ -z "${boot}" ] && return 0 case ${boot} in + /dev/md/*) + if [ -r /proc/mdstat ]; then + MD=${boot#/dev/md/} + boot="/dev/$(awk "/^md${MD}/{print substr(\$5, 1, 3)}" \ + /proc/mdstat)" + fi + ;; /dev/md*) if [ -r /proc/mdstat ]; then MD=${boot#/dev/} |