0001-fix-getty-unit.patch 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. From 69e440f9b7a0e9a43ef582d4bb521722b448a7c2 Mon Sep 17 00:00:00 2001
  2. From: Maxime Ripard <maxime.ripard@free-electrons.com>
  3. Date: Mon, 31 Jul 2017 10:08:46 -0400
  4. Subject: [PATCH] fix-getty-unit
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Prefer getty to agetty in console setup systemd units
  9. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
  10. Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
  11. [aduskett@gmail.com: Update for systemd v237]
  12. Signed-off-by: Adam Duskett <aduskett@gmail.com>
  13. [Jérémy: replace additional usage of agetty by getty.]
  14. Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr>
  15. ---
  16. units/console-getty.service.m4 | 2 +-
  17. units/container-getty@.service.m4 | 2 +-
  18. units/getty@.service.m4 | 5 +----
  19. units/serial-getty@.service.m4 | 2 +-
  20. 4 files changed, 4 insertions(+), 7 deletions(-)
  21. diff --git a/units/console-getty.service.m4 b/units/console-getty.service.m4
  22. index 3c553240a..fd5ad9456 100644
  23. --- a/units/console-getty.service.m4
  24. +++ b/units/console-getty.service.m4
  25. @@ -23,7 +23,7 @@ ConditionPathExists=/dev/console
  26. # The '-o' option value tells agetty to replace 'login' arguments with an
  27. # option to preserve environment (-p), followed by '--' for safety, and then
  28. # the entered username.
  29. -ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear --keep-baud console 115200,38400,9600 $TERM
  30. +ExecStart=-/sbin/getty -L console 115200 vt100
  31. Type=idle
  32. Restart=always
  33. UtmpIdentifier=cons
  34. diff --git a/units/container-getty@.service.m4 b/units/container-getty@.service.m4
  35. index 087ab7f9b..30f7b66fe 100644
  36. --- a/units/container-getty@.service.m4
  37. +++ b/units/container-getty@.service.m4
  38. @@ -28,7 +28,7 @@ Before=rescue.service
  39. # The '-o' option value tells agetty to replace 'login' arguments with an
  40. # option to preserve environment (-p), followed by '--' for safety, and then
  41. # the entered username.
  42. -ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear --keep-baud pts/%I 115200,38400,9600 $TERM
  43. +ExecStart=-/sbin/getty -L %I 115200 vt100
  44. Type=idle
  45. Restart=always
  46. RestartSec=0
  47. diff --git a/units/getty@.service.m4 b/units/getty@.service.m4
  48. index 80e793bb7..385758c61 100644
  49. --- a/units/getty@.service.m4
  50. +++ b/units/getty@.service.m4
  51. @@ -35,10 +35,7 @@ ConditionPathExists=/dev/tty0
  52. [Service]
  53. # the VT is cleared by TTYVTDisallocate
  54. -# The '-o' option value tells agetty to replace 'login' arguments with an
  55. -# option to preserve environment (-p), followed by '--' for safety, and then
  56. -# the entered username.
  57. -ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear %I $TERM
  58. +ExecStart=-/sbin/getty -L %I 115200 vt100
  59. Type=idle
  60. Restart=always
  61. RestartSec=0
  62. diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4
  63. index 757b86ab2..3d60efdb6 100644
  64. --- a/units/serial-getty@.service.m4
  65. +++ b/units/serial-getty@.service.m4
  66. @@ -33,7 +33,7 @@ Before=rescue.service
  67. # The '-o' option value tells agetty to replace 'login' arguments with an
  68. # option to preserve environment (-p), followed by '--' for safety, and then
  69. # the entered username.
  70. -ExecStart=-/sbin/agetty -o '-p -- \\u' --keep-baud 115200,38400,9600 %I $TERM
  71. +ExecStart=-/sbin/getty -L %I 115200 vt100
  72. Type=idle
  73. Restart=always
  74. UtmpIdentifier=%I
  75. --
  76. 2.14.4