grub2/grub2-once.service

18 lines
458 B
SYSTEMD
Raw Normal View History

[Unit]
Description=Restore grubenv
DefaultDependencies=no
After=local-fs.target
Before=sysinit.target shutdown.target
Conflicts=shutdown.target
ConditionPathIsReadWrite=/boot/grub2/grubenv
ConditionPathExists=/var/lib/misc/grub2-cleanup-once
[Service]
Type=oneshot
ExecStart=-/usr/bin/grub2-editenv /boot/grub2/grubenv unset next_entry
ExecStartPost=-/usr/bin/rm -f /var/lib/misc/grub2-cleanup-once
StandardOutput=journal
[Install]
WantedBy=sysinit.target