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