getty@.service 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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=Getty on %I
  11. Documentation=man:agetty(8) man:systemd-getty-generator(8)
  12. Documentation=http://0pointer.de/blog/projects/serial-console.html
  13. After=systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target
  14. After=rc-local.service
  15. # If additional gettys are spawned during boot then we should make
  16. # sure that this is synchronized before getty.target, even though
  17. # getty.target didn't actually pull it in.
  18. Before=getty.target
  19. IgnoreOnIsolate=yes
  20. # IgnoreOnIsolate causes issues with sulogin, if someone isolates
  21. # rescue.target or starts rescue.service from multi-user.target or
  22. # graphical.target.
  23. Conflicts=rescue.service
  24. Before=rescue.service
  25. # On systems without virtual consoles, don't start any getty. Note
  26. # that serial gettys are covered by serial-getty@.service, not this
  27. # unit.
  28. ConditionPathExists=/dev/tty0
  29. [Service]
  30. # the VT is cleared by TTYVTDisallocate
  31. # The '-o' option value tells agetty to replace 'login' arguments with an
  32. # option to preserve environment (-p), followed by '--' for safety, and then
  33. # the entered username.
  34. ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear %I $TERM
  35. Type=idle
  36. Restart=always
  37. RestartSec=0
  38. UtmpIdentifier=%I
  39. TTYPath=/dev/%I
  40. TTYReset=yes
  41. TTYVHangup=yes
  42. TTYVTDisallocate=yes
  43. KillMode=process
  44. IgnoreSIGPIPE=no
  45. SendSIGHUP=yes
  46. # Unset locale for the console getty since the console has problems
  47. # displaying some internationalized messages.
  48. UnsetEnvironment=LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION
  49. [Install]
  50. WantedBy=getty.target
  51. DefaultInstance=tty1