From d92876fa3cecab53b46a513e22d9a9fc9fb6be02 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 8 Apr 2015 07:53:40 -0400 Subject: grub2: read boot device from install.sh instead of from deprecated drakboot.conf --- perl-install/bootloader.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 0c6b317ad..a64b5dc59 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -292,6 +292,9 @@ Read back GRUB2 config + C sub read_grub2() { my %bootloader = getVarsFromSh("$::prefix/boot/grub2/drakboot.conf"); + if (is_empty_hash_ref(\%bootloader)) { + %bootloader = read_grub2_install_sh(); + } my %h = getVarsFromSh("$::prefix/etc/default/grub"); $bootloader{timeout} = $h{GRUB_TIMEOUT}; $bootloader{entries} = []; @@ -323,6 +326,15 @@ sub read_grub2() { \%bootloader; } +sub read_grub2_install_sh() { + my $s = cat_("$::prefix/boot/grub2/install.sh"); + my %h; + if ($s =~ m!(/dev/\S+)!m) { + $h{boot} = $1; + } + %h; +} + =item read_grub($fstab) Reads back Grub Legacy config. -- cgit v1.2.1