| 1 |
[Unit] |
| 2 |
Description=Record successful boot for GRUB |
| 3 |
Requires=boot-complete.target |
| 4 |
After=boot-complete.target suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target |
| 5 |
ConditionPathExists=/boot/grub/grub.cfg |
| 6 |
|
| 7 |
[Service] |
| 8 |
Type=oneshot |
| 9 |
Restart=no |
| 10 |
ExecStartPre=/bin/sh -c '[ -s /boot/grub/grubenv ] || rm -f /boot/grub/grubenv; mkdir -p /boot/grub' |
| 11 |
ExecStart=grub-editenv /boot/grub/grubenv unset recordfail |
| 12 |
ExecStartPost=/bin/sh -c 'if grub-editenv /boot/grub/grubenv list | grep -q initrdless_boot_fallback_triggered=1; then echo "grub: GRUB_FORCE_PARTUUID set, initrdless boot paniced, fallback triggered."; fi' |
| 13 |
StandardOutput=kmsg |
| 14 |
|
| 15 |
[Install] |
| 16 |
WantedBy=multi-user.target suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target |