diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-03-21 15:18:05 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-03-21 15:18:05 +0000 |
commit | 52102af9f98f888d876079182eed1fbc8c681ff2 (patch) | |
tree | d5de0ff7cca3b3eeda1d1fbbb9482fd593e4a488 | |
parent | 5d26d0cff18a0899fc14c7a8a0898203d927c860 (diff) | |
download | drakx-52102af9f98f888d876079182eed1fbc8c681ff2.tar drakx-52102af9f98f888d876079182eed1fbc8c681ff2.tar.gz drakx-52102af9f98f888d876079182eed1fbc8c681ff2.tar.bz2 drakx-52102af9f98f888d876079182eed1fbc8c681ff2.tar.xz drakx-52102af9f98f888d876079182eed1fbc8c681ff2.zip |
prepare next commit
-rw-r--r-- | perl-install/bootloader.pm | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 3b229aecc..a9691938e 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -212,20 +212,27 @@ sub read_grub { my $bootloader = read_grub_menu_lst($fstab, $grub2dev) or return; - read_grub_install_sh($bootloader, $grub2dev); + if (my $boot = read_grub_install_sh()->{boot}) { + $bootloader->{boot} = grub2dev($boot, $grub2dev); + } $bootloader; } -sub read_grub_install_sh { - my ($bootloader, $grub2dev) = @_; +sub read_grub_install_sh() { + my $s = cat_("$::prefix/boot/grub/install.sh"); + my %h; #- 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.*\sd)\s+(\(.*?\))/m) { - $bootloader->{boot} = grub2dev($1, $grub2dev); + if ($s =~ /^(?:setup.*|install\s.*\sd)\s+(\(.*?\))/m) { + $h{boot} = $1; } + if ($s =~ /^root\s+(\(.*?\))/m) { + $h{root} = $1; + } + \%h; } sub read_grub_menu_lst { |