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:
parent
c1df6c7a1f
commit
a79c01f92a
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 = "";
|
||||
|
@ -5,11 +5,12 @@ After=local-fs.target
|
||||
Before=sysinit.target shutdown.target
|
||||
Conflicts=shutdown.target
|
||||
ConditionPathIsReadWrite=/boot/grub2/grubenv
|
||||
ConditionPathExists=/var/tmp/grub2-cleanup-once
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=-/usr/bin/grub2-editenv /boot/grub2/grubenv unset next_entry
|
||||
ExecStartPost=-/usr/bin/systemctl disable grub2-once.service
|
||||
ExecStartPost=-/usr/bin/rm -f /var/tmp/grub2-cleanup-once
|
||||
StandardOutput=journal
|
||||
|
||||
[Install]
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon May 31 07:18:56 UTC 2021 - Michael Chang <mchang@suse.com>
|
||||
|
||||
- Fix running grub2-once leads to failure of starting systemd service in the
|
||||
boot sequence (bsc#1169460)
|
||||
* grub2-once
|
||||
* grub2-once.service
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 28 15:16:37 UTC 2021 - Michael Chang <mchang@suse.com>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user