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 |
David Wang | e536c40 | 2022-08-18 09:51:58 +0800 | [diff] [blame^] | 4 | After=dev-%i.device |
Brandon Kim | dc43764 | 2022-04-13 10:00:14 -0700 | [diff] [blame] | 5 | Before=getty.target |
| 6 | IgnoreOnIsolate=yes |
| 7 | |
| 8 | Requires=obmc-console@@HOST_TTY@.service |
| 9 | After=obmc-console@@HOST_TTY@.service |
| 10 | Conflicts=serial-to-bmc@%i.service |
| 11 | StartLimitIntervalSec=0 |
| 12 | |
| 13 | [Service] |
| 14 | Type=simple |
| 15 | Restart=always |
| 16 | RestartSec=0 |
| 17 | RestartPreventExitStatus=2 |
| 18 | SuccessExitStatus=2 |
| 19 | ExecStart=-/sbin/agetty -8 -n -l /usr/bin/obmc-console-client -o '-e a00pae9n2B9m1c' -i -N -R -L %I 115200 xterm |
| 20 | ExecStopPost=-/bin/sh -c '(( EXIT_STATUS == 2 )) && systemctl start --no-block serial-to-bmc@%i' |
| 21 | UtmpIdentifier=%I |
| 22 | TTYPath=/dev/%I |
| 23 | KillMode=process |
| 24 | IgnoreSIGPIPE=no |
| 25 | SendSIGHUP=yes |
| 26 | |
| 27 | [Install] |
| 28 | WantedBy=getty.target |