chiark / gitweb /
systemd-tmpfiles-setup-dev: remain after exit
[elogind.git] / units / getty@.service.m4
index c09722f429afe686208988beb4569b1ca8464da5..7853652009992e09eaa6c9ee00b1c21ac826a798 100644 (file)
@@ -7,23 +7,10 @@
 
 [Unit]
 Description=Getty on %I
+Documentation=man:agetty(8) man:systemd-getty-generator(8)
+Documentation=http://0pointer.de/blog/projects/serial-console.html
 After=systemd-user-sessions.service plymouth-quit-wait.service
-m4_ifdef(`TARGET_FEDORA',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_ARCH',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_FRUGALWARE',
-After=local.service
-)m4_dnl
-m4_ifdef(`TARGET_ALTLINUX',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_MANDRIVA',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_MAGEIA',
+m4_ifdef(`HAVE_SYSV_COMPAT',
 After=rc-local.service
 )m4_dnl
 
@@ -33,9 +20,15 @@ After=rc-local.service
 Before=getty.target
 IgnoreOnIsolate=yes
 
+# On systems without virtual consoles, don't start any getty. Note
+# that serial gettys are covered by serial-getty@.service, not this
+# unit.
+ConditionPathExists=/dev/tty0
+
 [Service]
-Environment=TERM=linux
-ExecStart=-/sbin/agetty %I 38400
+# the VT is cleared by TTYVTDisallocate
+ExecStart=-/sbin/agetty --noclear %I
+Type=idle
 Restart=always
 RestartSec=0
 UtmpIdentifier=%I
@@ -55,4 +48,4 @@ Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETA
 KillSignal=SIGHUP
 
 [Install]
-Alias=getty.target.wants/getty@tty1.service
+WantedBy=getty.target