From b6addf45ac88c40ead767bfd8ada635558b108d6 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Thu, 22 Jun 2017 08:23:06 +0100 Subject: 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. --- perl-install/NEWS | 1 + perl-install/bootloader.pm | 4 ++-- perl-install/install/NEWS | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'perl-install') 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 -- cgit v1.2.1