SHA256
1
0
forked from pool/grub2

Accepting request 898233 from home:michael-chang:branches:Base:System

- Fix running grub2-once leads to failure of starting systemd service in the
  boot sequence (bsc#1169460)
  * grub2-once
  * grub2-once.service

OBS-URL: https://build.opensuse.org/request/show/898233
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=385
This commit is contained in:
2021-06-08 05:13:58 +00:00
committed by Git OBS Bridge
parent c1df6c7a1f
commit a79c01f92a
3 changed files with 17 additions and 5 deletions

View File

@@ -177,11 +177,14 @@ sub parse_menuentry($$$) {
# work and function properly on lvm, md and s390.
sub enable_restore_grubenv_service {
my $systemctl="/usr/bin/systemctl";
my $systemctl = "/usr/bin/systemctl";
my $cleanup = "/var/tmp/grub2-cleanup-once";
if (-x $systemctl) {
system "$systemctl --no-reload enable grub2-once >/dev/null 2>&1";
}
open(my $fh, ">", $cleanup) or die "open: $cleanup $!\n";
close($fh);
return 0 if (system("$systemctl --quiet is-enabled grub2-once") == 0);
system "$systemctl --no-reload enable grub2-once >/dev/null 2>&1";
}
$id_name = "";