From: Michal Sekletar Date: Thu, 31 Aug 2017 09:20:14 +0000 (+0200) Subject: units: introduce getty-pre.target (#6667) X-Git-Tag: v235~193 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=175902541852fb9207f6e532d8da48c9a102340c;p=thirdparty%2Fsystemd.git 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 --- diff --git a/man/systemd.special.xml b/man/systemd.special.xml index 8522ff07619..b4ed3eb8f2f 100644 --- a/man/systemd.special.xml +++ b/man/systemd.special.xml @@ -59,6 +59,7 @@ exit.target, final.target, getty.target, + getty-pre.target, graphical.target, halt.target, hibernate.target, @@ -266,6 +267,17 @@ + + getty-pre.target + + A special passive target unit. Users of this target + are expected to pull it in the boot transaction via + a dependency (e.g. Wants=). Order your + unit before this unit if you want to make use of the console + just before getty is started. + + + graphical.target diff --git a/units/getty-pre.target b/units/getty-pre.target new file mode 100644 index 00000000000..f6c78b6c2e7 --- /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 2a84061ed67..b62f1b9225b 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 07b8a9d143e..be32a39e5f2 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 b7caeaff449..e56f47652cb 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