summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm12
1 files changed, 12 insertions, 0 deletions
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</boot/grub2/drakboot.conf>
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.