From a1ba5db6eec1c8181a2a06500479a22eae242afa Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 30 May 2008 14:05:22 +0200 Subject: 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 --- update-initramfs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'update-initramfs') 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/} -- cgit v1.2.3