From 9e602c73415f40b86e8ee7561940b8ee7cb5c1e6 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 6 Jun 2016 10:44:48 +0200 Subject: fix reading back last grub2 entry --- perl-install/NEWS | 1 + perl-install/bootloader.pm | 2 ++ perl-install/install/NEWS | 1 + 3 files changed, 4 insertions(+) diff --git a/perl-install/NEWS b/perl-install/NEWS index 42f7f8742..b2b73cc52 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,4 +1,5 @@ - drakboot: + o fix reading back last grub2 entry o only overwrite GRUB_CMDLINE_LINUX_DEFAULT on first install (mga#18112) o set GRUB_DEFAULT + GRUB_SAVEDEFAULT (mga#9627, mga#16059) o stop offering grub legacy & lilo on new installs (mga#18583) diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 483f67d1c..b6f9fcff1 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -318,6 +318,8 @@ sub read_grub2() { $entry->{initrd} = $1; } } + # last entry: + push @{$bootloader{entries}}, $entry if $entry; # get default entry: foreach (run_program::rooted_get_stdout($::prefix, qw(grub2-editenv list))) { diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 575432138..965a782aa 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,4 +1,5 @@ - bootloader: + o fix reading back last grub2 entry o only overwrite GRUB_CMDLINE_LINUX_DEFAULT on first install (mga#18112) o set GRUB_DEFAULT + GRUB_SAVEDEFAULT (mga#9627, mga#16059) o stop offering grub legacy & lilo on new installs (mga#18583) -- cgit v1.2.1