SHA256
1
0
forked from pool/grub2

Accepting request 683534 from Base:System

OBS-URL: https://build.opensuse.org/request/show/683534
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=201
This commit is contained in:
Dominique Leuenberger 2019-03-12 08:49:46 +00:00 committed by Git OBS Bridge
parent 3dcc817fb5
commit 697f0a4ca5
2 changed files with 19 additions and 7 deletions

View File

@ -199,17 +199,24 @@ open(SYSCONF, "</etc/sysconfig/bootloader") || die "cannot read bootloader sysco
$grub2_dir = "";
while (<SYSCONF>) {
if (/^#/) {
next
};
if (/LOADER_TYPE="(.*)"/) {
my $bl = $1;
if ($bl eq "grub2" || $bl eq "grub2-efi") {
chomp;
next if ( /^\s*#/ );
if ( /LOADER_TYPE=(\'|\"|)([^\'\"\s]+)\1(\s*|\s+#.*)$/ ) {
dPrint("OK : $2\n");
if ($2 eq "grub2" || $2 eq "grub2-efi") {
# Found grub2 to be the incumbent loader ...
$grub2_dir = "/boot/grub2";
$grub2_reboot = "/usr/sbin/grub2-reboot";
$grub2_editenv = "/usr/bin/grub2-editenv";
# Note : Here we continues rather than exiting the loop, which
# results in different behavior than previous "the first wins". Now
# the latest defined LOADER_TYPE can be used to override any
# previous one, which is identical to the result of regular shell
# variable expansion to meet most people's expectation.
}
last;
} else {
next if ( /^\s*$/ );
dPrint("SKIP: <$_>\n");
}
}

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Feb 20 08:38:55 UTC 2019 - mchang@suse.com
- Fix LOADER_TYPE parsing in grub2-once (boo#1122569)
-------------------------------------------------------------------
Tue Feb 12 08:57:03 UTC 2019 - mchang@suse.com