blob: 578568e8f2673e26b252b0cc622d2de47d51ac4c [file] [log] [blame]
Brandon Kimdc437642022-04-13 10:00:14 -07001[Unit]
2Description=Host Serial Getty on %I
3BindsTo=dev-%i.device
David Wange536c402022-08-18 09:51:58 +08004After=dev-%i.device
Brandon Kimdc437642022-04-13 10:00:14 -07005Before=getty.target
6IgnoreOnIsolate=yes
7
8Requires=obmc-console@@HOST_TTY@.service
9After=obmc-console@@HOST_TTY@.service
10Conflicts=serial-to-bmc@%i.service
11StartLimitIntervalSec=0
12
13[Service]
14Type=simple
15Restart=always
16RestartSec=0
17RestartPreventExitStatus=2
18SuccessExitStatus=2
19ExecStart=-/sbin/agetty -8 -n -l /usr/bin/obmc-console-client -o '-e a00pae9n2B9m1c' -i -N -R -L %I 115200 xterm
20ExecStopPost=-/bin/sh -c '(( EXIT_STATUS == 2 )) && systemctl start --no-block serial-to-bmc@%i'
21UtmpIdentifier=%I
22TTYPath=/dev/%I
23KillMode=process
24IgnoreSIGPIPE=no
25SendSIGHUP=yes
26
27[Install]
28WantedBy=getty.target