summaryrefslogtreecommitdiff
path: root/units
diff options
context:
space:
mode:
authorMichal Sekletar <msekletar@users.noreply.github.com>2017-08-31 11:20:14 +0200
committerLennart Poettering <lennart@poettering.net>2017-08-31 11:20:14 +0200
commit175902541852fb9207f6e532d8da48c9a102340c (patch)
tree24a84c33af7e73ebef71209e49ca9859d51f24fb /units
parentef965ed2e123ea408ae78fd47594285d18550af6 (diff)
downloadsystemd-175902541852fb9207f6e532d8da48c9a102340c.tar.gz
units: introduce getty-pre.target (#6667)
This new target is a passive unit, hence it is supposed to be pulled in to the transaction by the service that wants to block login on the console (e.g. text version of initial-setup). Now both getty and serial-getty are ordered after this target. https://lists.freedesktop.org/archives/systemd-devel/2015-July/033754.html
Diffstat (limited to 'units')
-rw-r--r--units/getty-pre.target11
-rw-r--r--units/getty@.service.m42
-rw-r--r--units/meson.build1
-rw-r--r--units/serial-getty@.service.m42
4 files changed, 14 insertions, 2 deletions
diff --git a/units/getty-pre.target b/units/getty-pre.target
new file mode 100644
index 0000000000..f6c78b6c2e
--- /dev/null
+++ b/units/getty-pre.target
@@ -0,0 +1,11 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Login Prompts (Pre)
+Documentation=man:systemd.special(7) man:systemd-getty-generator(8)
+Documentation=http://0pointer.de/blog/projects/serial-console.html
diff --git a/units/getty@.service.m4 b/units/getty@.service.m4
index 2a84061ed6..b62f1b9225 100644
--- a/units/getty@.service.m4
+++ b/units/getty@.service.m4
@@ -9,7 +9,7 @@
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
+After=systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target
m4_ifdef(`HAVE_SYSV_COMPAT',
After=rc-local.service
)m4_dnl
diff --git a/units/meson.build b/units/meson.build
index 07b8a9d143..be32a39e5f 100644
--- a/units/meson.build
+++ b/units/meson.build
@@ -13,6 +13,7 @@ units = [
['final.target', ''],
['getty.target', '',
'multi-user.target.wants/'],
+ ['getty-pre.target', ''],
['graphical.target', '',
'runlevel5.target default.target'],
['halt.target', ''],
diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4
index b7caeaff44..e56f47652c 100644
--- a/units/serial-getty@.service.m4
+++ b/units/serial-getty@.service.m4
@@ -10,7 +10,7 @@ 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
+After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target
m4_ifdef(`HAVE_SYSV_COMPAT',
After=rc-local.service
)m4_dnl