summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2017-06-22 08:23:06 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2017-06-22 08:23:06 +0100
commitb6addf45ac88c40ead767bfd8ada635558b108d6 (patch)
treed5fd8a9487336779ef5a37d6e71ea16e5f345a0a
parent6e34c1f3365c97351f9831773dd4ff29d5409da2 (diff)
downloaddrakx-b6addf45ac88c40ead767bfd8ada635558b108d6.tar
drakx-b6addf45ac88c40ead767bfd8ada635558b108d6.tar.gz
drakx-b6addf45ac88c40ead767bfd8ada635558b108d6.tar.bz2
drakx-b6addf45ac88c40ead767bfd8ada635558b108d6.tar.xz
drakx-b6addf45ac88c40ead767bfd8ada635558b108d6.zip
Don't overwrite custom grub2 settings when updating/upgrading (mga#20596)
Fixes a corner case bug where GRUB_DEFAULT and GRUB_SAVEDEFAULT would be overwritten if previously set to a value that evaluates as false.
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/bootloader.pm4
-rw-r--r--perl-install/install/NEWS1
3 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index e6d9e714a..4ccfbde5f 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,4 @@
+- don't overwrite custom grub2 settings when updating (mga#20596)
- recognize 8812au (mga#21043)
Version 17.84 - 5 June 2017
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index dc2863a44..6f9ff4eec 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -1866,8 +1866,8 @@ sub write_grub2_sysconfig {
$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
- $conf{GRUB_SAVEDEFAULT} ||= 'true'; # for default entry but do not overwrite user choice
+ $conf{GRUB_DEFAULT} //= 'saved'; # for default entry but do not overwrite user choice
+ $conf{GRUB_SAVEDEFAULT} //= 'true'; # for default entry but do not overwrite user choice
$conf{GRUB_TIMEOUT} = $bootloader->{timeout};
renamef($f, $f . ($o_backup_extension || '.old'));
setVarsInSh($f, \%conf);
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 6a66ad315..967130f4d 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,4 @@
+- don't overwrite custom grub2 settings when upgrading (mga#20596)
- recognize 8812au (mga#21043)
Version 17.84 - 5 June 2017