From ea98dcd202db06de523e93c4bc030ff63f3e7915 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sun, 19 Nov 2023 19:10:34 +0100 Subject: [PATCH] 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 --- src/PVE/LXC/Setup/Base.pm | 2 ++ 1 file changed, 2 insertions(+) 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)) { -- 2.39.2