From: Thomas Lamprecht Date: Sun, 19 Nov 2023 18:10:34 +0000 (+0100) Subject: setup: handle getty services also via systemd-preset X-Git-Url: https://git.proxmox.com/?p=pve-container.git;a=commitdiff_plain;h=ea98dcd202db06de523e93c4bc030ff63f3e7915 setup: handle getty services also via systemd-preset fixes an issue where the first boot of a Fedora 39 CT had no container-getty due to the default prefixes enabling the getty@ service instead, only on second boot (where presets aren't applied anymore) our TTY handling actually was in effect and worked. Note that preset aren't bothered by a service not existing, but still, for older distro releases disabling getty@ could lead to problem, for now we call this only for modern distro releases any way, and it also only affects newly created CTs. Signed-off-by: Thomas Lamprecht --- diff --git a/src/PVE/LXC/Setup/Base.pm b/src/PVE/LXC/Setup/Base.pm index 6392bb3..e136a43 100644 --- a/src/PVE/LXC/Setup/Base.pm +++ b/src/PVE/LXC/Setup/Base.pm @@ -326,6 +326,8 @@ sub setup_systemd_preset { my $preset = { 'sys-kernel-config.mount' => 0, 'sys-kernel-debug.mount' => 0, + 'getty@.service' => 0, + 'container-getty@.service' => 1, }; if (defined($extra_preset)) {