diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-08-25 03:09:57 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-08-25 03:09:57 +0200 |
commit | 93a45c562a1989dfbb2dd08c65f8a21b02959934 (patch) | |
tree | 236c75089c5e8a2c4b9581f0930472cf279dce13 /units | |
parent | addab137cd8d318e4f543ca56018ee23d51aaca9 (diff) |
serial: use seperate getty template for serial ttys
Diffstat (limited to 'units')
-rw-r--r-- | units/.gitignore | 1 | ||||
-rw-r--r-- | units/getty@.service.m4 | 2 | ||||
-rw-r--r-- | units/serial-getty@.service.m4 | 37 | ||||
-rw-r--r-- | units/systemd-auto-serial-getty.service (renamed from units/systemd-auto-console-getty.service.in) | 4 |
4 files changed, 41 insertions, 3 deletions
diff --git a/units/.gitignore b/units/.gitignore index 82a24170cf..35f790849e 100644 --- a/units/.gitignore +++ b/units/.gitignore @@ -1,3 +1,4 @@ +serial-getty@.service systemd-kmsg-syslogd.service systemd-modules-load.service systemd-remount-api-vfs.service diff --git a/units/getty@.service.m4 b/units/getty@.service.m4 index 01343c497f..4b65d5b906 100644 --- a/units/getty@.service.m4 +++ b/units/getty@.service.m4 @@ -30,7 +30,7 @@ Before=getty.target [Service] Environment=TERM=linux -ExecStart=GETTY %I +ExecStart=-GETTY %I Restart=restart-always RestartSec=0 KillMode=process-group diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4 new file mode 100644 index 0000000000..b91ed98330 --- /dev/null +++ b/units/serial-getty@.service.m4 @@ -0,0 +1,37 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +[Unit] +Description=Serial Getty on %I +Requires=dev-%i.device +After=dev-%i.device +m4_ifdef(`TARGET_FEDORA', +After=rc-local.service +)m4_dnl +m4_ifdef(`TARGET_ARCH', +After=rc-local.service +)m4_dnl + +# If additional gettys are spawned during boot (possibly by +# systemd-auto-console-getty) 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 + +[Service] +Environment=TERM=vt100-nav +m4_ifdef(`TARGET_FEDORA', +ExecStartPre=-/sbin/securetty %I +)m4_dnl +ExecStart=-/sbin/agetty -s %I 115200,38400,9600 +Restart=restart-always +RestartSec=0 +KillMode=process-group + +# Some login implementations ignore SIGTERM, so we send SIGHUP +# instead, to ensure that login terminates cleanly. +KillSignal=SIGHUP diff --git a/units/systemd-auto-console-getty.service.in b/units/systemd-auto-serial-getty.service index 6542cab18a..8051c7446a 100644 --- a/units/systemd-auto-console-getty.service.in +++ b/units/systemd-auto-serial-getty.service @@ -6,11 +6,11 @@ # (at your option) any later version. [Unit] -Description=Automatically Spawn getty on Kernel Console +Description=Automatically Spawn getty on Serial Kernel Console [Service] Type=oneshot -ExecStart=@rootlibexecdir@/systemd-auto-console-getty +ExecStart=@rootlibexecdir@/systemd-auto-serial-getty [Install] WantedBy=getty.target |