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:
Michael Chang 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 = "";

View File

@ -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]

View File

@ -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>