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:
parent
3dcc817fb5
commit
697f0a4ca5
21
grub2-once
21
grub2-once
@ -199,17 +199,24 @@ open(SYSCONF, "</etc/sysconfig/bootloader") || die "cannot read bootloader sysco
|
|||||||
|
|
||||||
$grub2_dir = "";
|
$grub2_dir = "";
|
||||||
while (<SYSCONF>) {
|
while (<SYSCONF>) {
|
||||||
if (/^#/) {
|
chomp;
|
||||||
next
|
next if ( /^\s*#/ );
|
||||||
};
|
if ( /LOADER_TYPE=(\'|\"|)([^\'\"\s]+)\1(\s*|\s+#.*)$/ ) {
|
||||||
if (/LOADER_TYPE="(.*)"/) {
|
dPrint("OK : $2\n");
|
||||||
my $bl = $1;
|
if ($2 eq "grub2" || $2 eq "grub2-efi") {
|
||||||
if ($bl eq "grub2" || $bl eq "grub2-efi") {
|
# Found grub2 to be the incumbent loader ...
|
||||||
$grub2_dir = "/boot/grub2";
|
$grub2_dir = "/boot/grub2";
|
||||||
$grub2_reboot = "/usr/sbin/grub2-reboot";
|
$grub2_reboot = "/usr/sbin/grub2-reboot";
|
||||||
$grub2_editenv = "/usr/bin/grub2-editenv";
|
$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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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
|
Tue Feb 12 08:57:03 UTC 2019 - mchang@suse.com
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user