serial-getty@.service 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # SPDX-License-Identifier: LGPL-2.1+
  2. #
  3. # This file is part of systemd.
  4. #
  5. # systemd is free software; you can redistribute it and/or modify it
  6. # under the terms of the GNU Lesser General Public License as published by
  7. # the Free Software Foundation; either version 2.1 of the License, or
  8. # (at your option) any later version.
  9. [Unit]
  10. Description=Serial Getty on %I
  11. Documentation=man:agetty(8) man:systemd-getty-generator(8)
  12. Documentation=http://0pointer.de/blog/projects/serial-console.html
  13. BindsTo=dev-%i.device
  14. After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target
  15. After=rc-local.service
  16. # If additional gettys are spawned during boot then we should make
  17. # sure that this is synchronized before getty.target, even though
  18. # getty.target didn't actually pull it in.
  19. Before=getty.target
  20. IgnoreOnIsolate=yes
  21. # IgnoreOnIsolate causes issues with sulogin, if someone isolates
  22. # rescue.target or starts rescue.service from multi-user.target or
  23. # graphical.target.
  24. Conflicts=rescue.service
  25. Before=rescue.service
  26. [Service]
  27. # The '-o' option value tells agetty to replace 'login' arguments with an
  28. # option to preserve environment (-p), followed by '--' for safety, and then
  29. # the entered username.
  30. ExecStart=-/sbin/agetty -o '-p -- \\u' --keep-baud 115200,38400,9600 %I $TERM
  31. Type=idle
  32. Restart=always
  33. UtmpIdentifier=%I
  34. TTYPath=/dev/%I
  35. TTYReset=yes
  36. TTYVHangup=yes
  37. KillMode=process
  38. IgnoreSIGPIPE=no
  39. SendSIGHUP=yes
  40. [Install]
  41. WantedBy=getty.target