diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2017-06-22 08:23:06 +0100 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2017-06-22 08:23:06 +0100 |
commit | b6addf45ac88c40ead767bfd8ada635558b108d6 (patch) | |
tree | d5fd8a9487336779ef5a37d6e71ea16e5f345a0a /perl-install/bootloader.pm | |
parent | 6e34c1f3365c97351f9831773dd4ff29d5409da2 (diff) | |
download | drakx-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.
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r-- | perl-install/bootloader.pm | 4 |
1 files changed, 2 insertions, 2 deletions
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); |