From e97429902dd75744e6df8d147e7ddea8d69a2e91 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 30 Jul 2024 16:22:34 +0200 Subject: [PATCH] units: Import tty specific credentials for each getty unit As explained in the previous commit, this allows us to configure agetty and login for individual ttys instead of globally. --- units/console-getty.service.in | 2 ++ units/container-getty@.service.in | 2 ++ units/getty@.service.in | 2 ++ units/serial-getty@.service.in | 2 ++ 4 files changed, 8 insertions(+) diff --git a/units/console-getty.service.in b/units/console-getty.service.in index 2de31dd01aa..841c4496f02 100644 --- a/units/console-getty.service.in +++ b/units/console-getty.service.in @@ -37,6 +37,8 @@ KillMode=process {% endif %} IgnoreSIGPIPE=no SendSIGHUP=yes +ImportCredential=tty.console.agetty.*:agetty. +ImportCredential=tty.console.login.*:login. ImportCredential=agetty.* ImportCredential=login.* diff --git a/units/container-getty@.service.in b/units/container-getty@.service.in index 7e277a49bc5..1f633836419 100644 --- a/units/container-getty@.service.in +++ b/units/container-getty@.service.in @@ -43,5 +43,7 @@ KillMode=process {% endif %} IgnoreSIGPIPE=no SendSIGHUP=yes +ImportCredential=tty.container.%I.agetty.*:agetty. +ImportCredential=tty.container.%I.login.*:login. ImportCredential=agetty.* ImportCredential=login.* diff --git a/units/getty@.service.in b/units/getty@.service.in index ce8db9764e0..983f6dba494 100644 --- a/units/getty@.service.in +++ b/units/getty@.service.in @@ -53,6 +53,8 @@ KillMode=process {% endif %} IgnoreSIGPIPE=no SendSIGHUP=yes +ImportCredential=tty.virtual.%I.agetty.*:agetty. +ImportCredential=tty.virtual.%I.login.*:login. ImportCredential=agetty.* ImportCredential=login.* diff --git a/units/serial-getty@.service.in b/units/serial-getty@.service.in index 5669b19aff1..afb8ad06a77 100644 --- a/units/serial-getty@.service.in +++ b/units/serial-getty@.service.in @@ -47,6 +47,8 @@ KillMode=process {% endif %} IgnoreSIGPIPE=no SendSIGHUP=yes +ImportCredential=tty.serial.%I.agetty.*:agetty. +ImportCredential=tty.serial.%I.login.*:login. ImportCredential=agetty.* ImportCredential=login.*