summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS3
-rw-r--r--perl-install/any.pm4
-rw-r--r--perl-install/bootloader.pm7
-rw-r--r--perl-install/install/NEWS2
4 files changed, 10 insertions, 6 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 499f28425..6fadd0588 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,6 @@
+- drakboot:
+ o fix not being able to edit default grub2 cmdline (mga#18952)
+
Version 17.51 - 12 July 2016
- diskdrake:
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 6809a522f..d25ac5ab8 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -622,7 +622,7 @@ sub setupBootloader__grub2 {
my $b2 = bootloader::read_grub2();
# get default parameters:
- my $append = $b->{entries}[0]{append} ||= bootloader::get_grub2_append($b2);
+ my $append = $b->{default_append} || $b->{entries}[0]{append} || bootloader::get_grub2_append($b2);
my $default = $b2->{default};
require Xconfig::resolution_and_depth;
@@ -654,7 +654,7 @@ sub setupBootloader__grub2 {
$b->{entries} = $b2->{entries};
$b->{default} = $default;
$b->{vga} = ref($vga) ? $vga->{bios} : $vga;
- first(@{$b->{entries}})->{append} = $append;
+ $b->{default_append} = $append;
if ($os_prober) {
$in->do_pkgs->ensure_is_installed('os-prober', '/usr/bin/os-prober');
} else {
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index d511bf6be..b99db9f83 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -307,6 +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};
$bootloader{entries} = [];
my $entry;
my $f = "$::prefix/boot/grub2/grub.cfg";
@@ -1870,10 +1872,7 @@ sub write_grub2_sysconfig {
my $f = "$::prefix/etc/default/grub";
my %conf = getVarsFromSh($f);
- # First installation or migration from grub-legacy/lilo?
- if (! -f get_grub2_install_sh()) {
- $conf{GRUB_CMDLINE_LINUX_DEFAULT} = get_grub2_append($bootloader);
- }
+ $conf{GRUB_CMDLINE_LINUX_DEFAULT} = $bootloader->{default_append} || 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
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 21bf4449d..e9c3e0827 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,4 +1,6 @@
- do not preinstall mageia-gfxboot-theme
+- bootloader configuration:
+ o fix not being able to edit default grub2 cmdline (mga#18952)
Version 17.51 - 12 July 2016