summaryrefslogtreecommitdiff
path: root/data/templates/getty/serial-getty.service.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-06-11 14:49:04 +0200
committerChristian Poessinger <christian@poessinger.com>2020-06-11 14:49:04 +0200
commit5c94168a7fa6dc7a82e307240bf7fde8bbece82c (patch)
tree3b78f3a3f5936b8e7051f7ce1c9f12ec38b65db1 /data/templates/getty/serial-getty.service.tmpl
parentf812c5d1ce01efa8323bfb797c57f68f474665bb (diff)
parentef6f5d8054bb4e6a35260b86ebd845c8289fbaca (diff)
downloadvyos-1x-5c94168a7fa6dc7a82e307240bf7fde8bbece82c.tar.gz
vyos-1x-5c94168a7fa6dc7a82e307240bf7fde8bbece82c.zip
Merge branch 'serial-console' of github.com:c-po/vyos-1x into current
* 'serial-console' of github.com:c-po/vyos-1x: console: T2569: run VGA console powersave on tty1 console: T2569: replicate console settings to grub.cfg Debian: fix warning about undefined substitution variables console: T2569: only start serial console if device exists console: T2529: migrate from ttyUSB device to new device in /dev/serial/by-bus console: T2570: remove support for Hayes Modems netconsole: T2561: use migrator to delete config nodes console: T2569: initial implementation with XML and Python
Diffstat (limited to 'data/templates/getty/serial-getty.service.tmpl')
-rw-r--r--data/templates/getty/serial-getty.service.tmpl37
1 files changed, 37 insertions, 0 deletions
diff --git a/data/templates/getty/serial-getty.service.tmpl b/data/templates/getty/serial-getty.service.tmpl
new file mode 100644
index 000000000..0183eae7d
--- /dev/null
+++ b/data/templates/getty/serial-getty.service.tmpl
@@ -0,0 +1,37 @@
+[Unit]
+Description=Serial Getty on %I
+Documentation=man:agetty(8) man:systemd-getty-generator(8)
+Documentation=http://0pointer.de/blog/projects/serial-console.html
+BindsTo=dev-%i.device
+After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target
+After=vyos-router.service
+
+# If additional gettys are spawned during boot then we should make
+# sure that this is synchronized before getty.target, even though
+# getty.target didn't actually pull it in.
+Before=getty.target
+IgnoreOnIsolate=yes
+
+# IgnoreOnIsolate causes issues with sulogin, if someone isolates
+# rescue.target or starts rescue.service from multi-user.target or
+# graphical.target.
+Conflicts=rescue.service
+Before=rescue.service
+
+[Service]
+# The '-o' option value tells agetty to replace 'login' arguments with an
+# option to preserve environment (-p), followed by '--' for safety, and then
+# the entered username.
+ExecStart=-/sbin/agetty -o '-p -- \\u' --keep-baud {{ speed }} %I $TERM
+Type=idle
+Restart=always
+UtmpIdentifier=%I
+TTYPath=/dev/%I
+TTYReset=yes
+TTYVHangup=yes
+KillMode=process
+IgnoreSIGPIPE=no
+SendSIGHUP=yes
+
+[Install]
+WantedBy=getty.target