manager: use reboot.target as the default for ctrl-alt-del.target

systemd tries to start ctrl-alt-del.target after receiving a request
to reboot in a container (or when ctrl-alt-del is pressed on a real
machine). If the alias is missing, this will fail. Let's provide a
fallback for this too. I don't think it makes sense to make it
configurable: it seems almost everybody is fine with the default
mapping. If not, people can always just create the symlink in the
filesystem.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-07-02 17:19:18 +02:00
parent 2e4ef3dca5
commit 83e4074af1
2 changed files with 14 additions and 3 deletions
+3
View File
@@ -110,6 +110,9 @@
#define SPECIAL_SIGPWR_TARGET "sigpwr.target"
#define SPECIAL_CTRL_ALT_DEL_TARGET "ctrl-alt-del.target"
/* The unit to use as fallback if ctrl-alt-del.target (which is usually an alias) cannot be loaded. */
#define FALLBACK_CTRL_ALT_DEL_TARGET "reboot.target"
/* Where we add all our system units, users and machines by default */
#define SPECIAL_SYSTEM_SLICE "system.slice"
#define SPECIAL_USER_SLICE "user.slice"