mirror of
https://github.com/systemd/systemd
synced 2024-07-21 10:17:21 +00:00
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
This commit is contained in:
parent
ef965ed2e1
commit
1759025418
|
@ -59,6 +59,7 @@
|
|||
<filename>exit.target</filename>,
|
||||
<filename>final.target</filename>,
|
||||
<filename>getty.target</filename>,
|
||||
<filename>getty-pre.target</filename>,
|
||||
<filename>graphical.target</filename>,
|
||||
<filename>halt.target</filename>,
|
||||
<filename>hibernate.target</filename>,
|
||||
|
@ -266,6 +267,17 @@
|
|||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><filename>getty-pre.target</filename></term>
|
||||
<listitem>
|
||||
<para>A special passive target unit. Users of this target
|
||||
are expected to pull it in the boot transaction via
|
||||
a dependency (e.g. <varname>Wants=</varname>). Order your
|
||||
unit before this unit if you want to make use of the console
|
||||
just before <filename>getty</filename> is started.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><filename>graphical.target</filename></term>
|
||||
<listitem>
|
||||
|
|
11
units/getty-pre.target
Normal file
11
units/getty-pre.target
Normal file
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -13,6 +13,7 @@ units = [
|
|||
['final.target', ''],
|
||||
['getty.target', '',
|
||||
'multi-user.target.wants/'],
|
||||
['getty-pre.target', ''],
|
||||
['graphical.target', '',
|
||||
'runlevel5.target default.target'],
|
||||
['halt.target', ''],
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue