]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-boot: when rebooting or powering off, save config state
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 7 Oct 2023 12:00:42 +0000 (14:00 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 12 Oct 2023 10:13:56 +0000 (12:13 +0200)
commit56747a1f13e4c7314aeb31f2da30f7ddac175105
tree7a19add23e8b5f94181b29e5de158f44cb54ae96
parent6ad3dc409b5121bc5ec3a949001b8eab3405993c
sd-boot: when rebooting or powering off, save config state

The menu_run() function allows the user to set/unset default entry, or to
increase/decrease menu timeout. After a keypress, status like
  "Menu timeout set to 5 s"
is printed, but there actually isn't any immediate effect. The value is only
written right right before booting a menu entry to avoid unnecessary wear&tear
on the nvram storage. This delayed write is supposed to be invisible to the
user.

Nevertheless, operations like reboot into firmware, reboot, or shutdown were
done immediately. We need to exit the loop first, save the state, and only do
the op afterwards.

Fixup for f6531b11d21931b3952d566ceded672ba21681cc and
e6cab77eca8f6556f381c348b0452b526a752ab7.
Also reverts 498d0cc426afc13fdadb0a385fd16c005645e0cf.
src/boot/efi/boot.c