1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-21 02:50:18 +03:00

test: Connect test unit to console when running interactively

When running interactively, let's connect the test unit directly
to the console. This enables adding "bash" anywhere within an
integration test to get a shell within the test environment.

(cherry picked from commit fe7413d1955bbf0f8fe869543c423025a22a4671)
This commit is contained in:
Daan De Meyer 2025-03-03 12:35:11 +01:00 committed by Luca Boccassi
parent b629b7100e
commit 4c18caaa75

View File

@ -456,6 +456,16 @@ def main() -> None:
[Unit]
Wants=multi-user.target getty-pre.target
Before=getty-pre.target
[Service]
StandardInput=tty
StandardOutput=inherit
StandardError=inherit
TTYReset=yes
TTYVHangup=yes
IgnoreSIGPIPE=no
# bash ignores SIGTERM
KillSignal=SIGHUP
"""
)