From 77fd9b04561c033816dd35666aef997547752025 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 17 Jun 2005 02:57:05 +0000 Subject: rewrite and document --- perl-install/bootloader.pm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 012921026..67ab14c00 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -229,12 +229,11 @@ sub read_grub { } } } - foreach (cat_("$::prefix/boot/grub/install.sh")) { - if (/\s+d\s+(\(.*?\))/) { - $b{boot} = grub2dev($1, $grub2dev); - } elsif (/^setup\s+(\(.*?\))/) { - $b{boot} = grub2dev($1, $grub2dev); - } + #- matches either: + #- setup (hd0) + #- install (hd0,0)/boot/grub/stage1 d (hd0) (hd0,0)/boot/grub/stage2 p (hd0,0)/boot/grub/menu.lst + if (cat_("$::prefix/boot/grub/install.sh") =~ /^(?:setup|install\s+(?:\S+)(?:\s+d)?)\s+(\(.*?\))/m) { + $b{boot} = grub2dev($1, $grub2dev); } #- sanitize -- cgit v1.2.1