diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2017-03-19 03:52:49 +0100 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-05-28 11:42:31 +0100 |
commit | c35e3401880b2f57d20862b533e341b9b7c32f18 (patch) | |
tree | 80b8930440ca542cd4fd8d543795ef31a55fe1fa | |
parent | ca91b05dec0360fec78ba917a701c4b7a1f45e13 (diff) | |
download | drakx-c35e3401880b2f57d20862b533e341b9b7c32f18.tar drakx-c35e3401880b2f57d20862b533e341b9b7c32f18.tar.gz drakx-c35e3401880b2f57d20862b533e341b9b7c32f18.tar.bz2 drakx-c35e3401880b2f57d20862b533e341b9b7c32f18.tar.xz drakx-c35e3401880b2f57d20862b533e341b9b7c32f18.zip |
Revert "do not alter /etc/default/grub on kernel updates"
This reverts commit 7bb01fb038e0a882e755b963110bda381336b748 and
commit 4c1cb5006360ccb780926000bd57f150e0fc8fbe
(cherry picked from commit a2594a936ea91a08881cb40e056f1407065a2ee6)
-rw-r--r-- | perl-install/bootloader.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 6af1f1680..6b2a6524a 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1896,14 +1896,18 @@ sub write_grub2_default_entry { } } -sub write_grub2() { +sub write_grub2 { + my ($bootloader, $o_all_hds, $o_backup_extension) = @_; my $error; + write_grub2_sysconfig($bootloader, $o_all_hds, $o_backup_extension); + my $f1 = "$::prefix/boot/grub2/grub.cfg"; renamef($f1, $f1 . '.old'); run_program::rooted($::prefix, 'update-grub2', '2>', \$error) or die "update-grub2 failed: $error"; log::l("update-grub2 logs: $error"); + write_grub2_default_entry($bootloader, $o_all_hds, $o_backup_extension); check_enough_space(); } @@ -2122,9 +2126,7 @@ sub restore_previous_MBR_bootloader { sub install_grub2 { my ($bootloader, $all_hds) = @_; - write_grub2_sysconfig($bootloader, $all_hds); - write_grub2(); - write_grub2_default_entry($bootloader, $all_hds); + write_grub2($bootloader, $all_hds); write_grub2_install_sh($bootloader, '.old'); install_raw_grub2(); } |