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