summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2017-07-23 16:18:49 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-05-28 11:42:02 +0100
commitca91b05dec0360fec78ba917a701c4b7a1f45e13 (patch)
tree1334f01be3f9224849eb5ce633d608a8f7ecfc5a /perl-install/bootloader.pm
parent1e5b83d5f33ba992b316bba72331b946786e0101 (diff)
downloaddrakx-ca91b05dec0360fec78ba917a701c4b7a1f45e13.tar
drakx-ca91b05dec0360fec78ba917a701c4b7a1f45e13.tar.gz
drakx-ca91b05dec0360fec78ba917a701c4b7a1f45e13.tar.bz2
drakx-ca91b05dec0360fec78ba917a701c4b7a1f45e13.tar.xz
drakx-ca91b05dec0360fec78ba917a701c4b7a1f45e13.zip
Combine bootloader perImageAppend and default_append keys.
This allows changes to the append options to propagate to the grub2 configuration file, thus fixing mga#21263 and mga#21250. (cherry picked from commit 6fb73fba36f9fcf88251f3bd3ad8ee67950c8541)
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 42f4f9586..6af1f1680 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -307,8 +307,8 @@ sub read_grub2() {
return if is_empty_hash_ref(\%bootloader) & !-s "$::prefix/boot/grub2/grub.cfg";
my %h = getVarsFromSh("$::prefix/etc/default/grub");
$bootloader{timeout} = $h{GRUB_TIMEOUT};
- # on first run (during installer) or when migrating from grub-legacy or lilo:
- $bootloader{default_append} ||= $::isInstall ? get_grub2_append(\%bootloader) : $h{GRUB_CMDLINE_LINUX_DEFAULT};
+ # keep suggested perImageAppend on first run (during installer) or when migrating from grub-legacy or lilo:
+ $bootloader{perImageAppend} ||= $h{GRUB_CMDLINE_LINUX_DEFAULT};
$bootloader{entries} = [];
my $entry;
my $f = "$::prefix/boot/grub2/grub.cfg";
@@ -1228,6 +1228,8 @@ sub suggest {
$bootloader->{method} ||= first(method_choices($all_hds, 1), # best installed
method_choices($all_hds, 0)); # or best if no valid one is installed
+ $bootloader->{perImageAppend} = $bootloader->{entries}[0]{append};
+
if (main_method($bootloader->{method}) eq 'grub') {
my %processed_entries = {};
foreach my $c (find_other_distros_grub_conf($fstab)) {
@@ -1863,7 +1865,7 @@ sub write_grub2_sysconfig {
my $f = "$::prefix/etc/default/grub";
my %conf = getVarsFromSh($f);
- $conf{GRUB_CMDLINE_LINUX_DEFAULT} = $bootloader->{default_append} || get_grub2_append($bootloader);
+ $conf{GRUB_CMDLINE_LINUX_DEFAULT} = $bootloader->{perImageAppend} || get_grub2_append($bootloader);
$conf{GRUB_GFXPAYLOAD_LINUX} = 'auto' if is_uefi();
$conf{GRUB_DISABLE_RECOVERY} = 'false'; # for 'failsafe' entry
$conf{GRUB_DEFAULT} //= 'saved'; # for default entry but do not overwrite user choice