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:
11
grub2-once
11
grub2-once
@@ -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 = "";
|
||||
|
Reference in New Issue
Block a user