]> git.proxmox.com Git - pve-container.git/commitdiff
setup: handle getty services also via systemd-preset
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 19 Nov 2023 18:10:34 +0000 (19:10 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 19 Nov 2023 18:19:56 +0000 (19:19 +0100)
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 <t.lamprecht@proxmox.com>
src/PVE/LXC/Setup/Base.pm

index 6392bb3186dbf2b3584f2bb6afdb6f739ebd67db..e136a436b5ac8181ce365edea3eba3630862a08c 100644 (file)
@@ -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)) {