mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
units: introduce and explain sysinit.target
This commit is contained in:
parent
2f630e5ffd
commit
f92a18f527
16
Makefile.am
16
Makefile.am
@ -87,6 +87,7 @@ interface_DATA = \
|
|||||||
|
|
||||||
dist_systemunit_DATA = \
|
dist_systemunit_DATA = \
|
||||||
units/emergency.service \
|
units/emergency.service \
|
||||||
|
units/basic.target \
|
||||||
units/getty.target \
|
units/getty.target \
|
||||||
units/halt.target \
|
units/halt.target \
|
||||||
units/local-fs.target \
|
units/local-fs.target \
|
||||||
@ -119,7 +120,7 @@ dist_systemunit_DATA = \
|
|||||||
units/var-run.mount
|
units/var-run.mount
|
||||||
|
|
||||||
systemunit_DATA = \
|
systemunit_DATA = \
|
||||||
units/basic.target \
|
units/sysinit.target \
|
||||||
units/getty@.service \
|
units/getty@.service \
|
||||||
units/graphical.target \
|
units/graphical.target \
|
||||||
units/multi-user.target \
|
units/multi-user.target \
|
||||||
@ -135,7 +136,7 @@ sessionunit_DATA = \
|
|||||||
units/session/exit.service
|
units/session/exit.service
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
units/basic.target.m4 \
|
units/sysinit.target.m4 \
|
||||||
units/getty@.service.m4 \
|
units/getty@.service.m4 \
|
||||||
units/graphical.target.m4 \
|
units/graphical.target.m4 \
|
||||||
units/multi-user.target.m4 \
|
units/multi-user.target.m4 \
|
||||||
@ -398,7 +399,7 @@ CLEANFILES = \
|
|||||||
units/systemd-initctl.service \
|
units/systemd-initctl.service \
|
||||||
units/systemd-logger.service \
|
units/systemd-logger.service \
|
||||||
units/syslog.target \
|
units/syslog.target \
|
||||||
units/basic.target \
|
units/sysinit.target \
|
||||||
units/getty@.service \
|
units/getty@.service \
|
||||||
units/graphical.target \
|
units/graphical.target \
|
||||||
units/multi-user.target \
|
units/multi-user.target \
|
||||||
@ -470,7 +471,7 @@ install-data-hook:
|
|||||||
$(DESTDIR)$(systemunitdir) \
|
$(DESTDIR)$(systemunitdir) \
|
||||||
$(DESTDIR)$(sessionunitdir) \
|
$(DESTDIR)$(sessionunitdir) \
|
||||||
$(DESTDIR)$(systemunitdir)/sockets.target.wants \
|
$(DESTDIR)$(systemunitdir)/sockets.target.wants \
|
||||||
$(DESTDIR)$(systemunitdir)/basic.target.wants \
|
$(DESTDIR)$(systemunitdir)/sysinit.target.wants \
|
||||||
$(DESTDIR)$(pkgsysconfdir)/system \
|
$(DESTDIR)$(pkgsysconfdir)/system \
|
||||||
$(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
|
$(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
|
||||||
$(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
|
$(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
|
||||||
@ -516,9 +517,10 @@ install-data-hook:
|
|||||||
$(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
|
$(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
|
||||||
$(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
|
$(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
|
||||||
( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
|
( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
|
||||||
rm -f getty.target && \
|
rm -f getty.target remote-fs.target && \
|
||||||
$(LN_S) $(systemunitdir)/getty.target getty.target )
|
$(LN_S) $(systemunitdir)/getty.target getty.target && \
|
||||||
( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
|
$(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
|
||||||
|
( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
|
||||||
rm -f dev-hugepages.automount \
|
rm -f dev-hugepages.automount \
|
||||||
dev-mqueue.automount \
|
dev-mqueue.automount \
|
||||||
proc-sys-fs-binfmt_misc.automount \
|
proc-sys-fs-binfmt_misc.automount \
|
||||||
|
@ -80,6 +80,7 @@
|
|||||||
<filename>sigpwr.target</filename>,
|
<filename>sigpwr.target</filename>,
|
||||||
<filename>sockets.target</filename>,
|
<filename>sockets.target</filename>,
|
||||||
<filename>swap.target</filename>,
|
<filename>swap.target</filename>,
|
||||||
|
<filename>sysinit.target</filename>,
|
||||||
<filename>syslog.target</filename>,
|
<filename>syslog.target</filename>,
|
||||||
<filename>@SPECIAL_SYSLOG_SERVICE@</filename>,
|
<filename>@SPECIAL_SYSLOG_SERVICE@</filename>,
|
||||||
<filename>systemd-initctl.service</filename>,
|
<filename>systemd-initctl.service</filename>,
|
||||||
@ -111,16 +112,15 @@
|
|||||||
target unit to all SysV
|
target unit to all SysV
|
||||||
service units configured for
|
service units configured for
|
||||||
runlevel 1 to 5.</para>
|
runlevel 1 to 5.</para>
|
||||||
<para>systemd automatically
|
<para>Usually this should pull
|
||||||
adds dependencies of the types
|
in all sockets, mount points,
|
||||||
Wants and After for all
|
swap devices and other basic
|
||||||
SysV service units configured
|
initialization necessary for
|
||||||
for runlevels that are not 0
|
the general purpose
|
||||||
to 6 to this target unit.
|
daemons. Most normal daemon
|
||||||
This covers the special
|
should have dependencies of
|
||||||
boot-up runlevels some
|
type After and Requires on
|
||||||
distributions have, such as S
|
this unit.</para>
|
||||||
or b.</para>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@ -586,6 +586,23 @@
|
|||||||
service).</para>
|
service).</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term><filename>sysinit.target</filename></term>
|
||||||
|
<listitem>
|
||||||
|
<para>A special target unit
|
||||||
|
covering early boot-up scripts.</para>
|
||||||
|
<para>systemd automatically
|
||||||
|
adds dependencies of the types
|
||||||
|
Wants and After for all
|
||||||
|
SysV service units configured
|
||||||
|
for runlevels that are not 0
|
||||||
|
to 6 to this target unit.
|
||||||
|
This covers the special
|
||||||
|
boot-up runlevels some
|
||||||
|
distributions have, such as S
|
||||||
|
or b.</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><filename>@SPECIAL_SYSLOG_SERVICE@</filename></term>
|
<term><filename>@SPECIAL_SYSLOG_SERVICE@</filename></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -108,6 +108,7 @@ struct Watch {
|
|||||||
#define SPECIAL_DISPLAY_MANAGER_SERVICE "display-manager.service" /* Debian's $x-display-manager */
|
#define SPECIAL_DISPLAY_MANAGER_SERVICE "display-manager.service" /* Debian's $x-display-manager */
|
||||||
#define SPECIAL_MAIL_TRANSFER_AGENT_TARGET "mail-transfer-agent.target" /* Debian's $mail-{transport|transfer-agent */
|
#define SPECIAL_MAIL_TRANSFER_AGENT_TARGET "mail-transfer-agent.target" /* Debian's $mail-{transport|transfer-agent */
|
||||||
#define SPECIAL_BASIC_TARGET "basic.target"
|
#define SPECIAL_BASIC_TARGET "basic.target"
|
||||||
|
#define SPECIAL_SYSINIT_TARGET "sysinit.target"
|
||||||
#define SPECIAL_RESCUE_TARGET "rescue.target"
|
#define SPECIAL_RESCUE_TARGET "rescue.target"
|
||||||
#define SPECIAL_EXIT_SERVICE "exit.service"
|
#define SPECIAL_EXIT_SERVICE "exit.service"
|
||||||
|
|
||||||
|
@ -58,10 +58,10 @@ static const struct {
|
|||||||
{ "rc6.d", SPECIAL_RUNLEVEL6_TARGET, RUNLEVEL_DOWN },
|
{ "rc6.d", SPECIAL_RUNLEVEL6_TARGET, RUNLEVEL_DOWN },
|
||||||
|
|
||||||
/* SUSE style boot.d */
|
/* SUSE style boot.d */
|
||||||
{ "boot.d", SPECIAL_BASIC_TARGET, RUNLEVEL_BASIC },
|
{ "boot.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_BASIC },
|
||||||
|
|
||||||
/* Debian style rcS.d */
|
/* Debian style rcS.d */
|
||||||
{ "rcS.d", SPECIAL_BASIC_TARGET, RUNLEVEL_BASIC },
|
{ "rcS.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_BASIC },
|
||||||
};
|
};
|
||||||
|
|
||||||
#define RUNLEVELS_UP "12345"
|
#define RUNLEVELS_UP "12345"
|
||||||
|
2
units/.gitignore
vendored
2
units/.gitignore
vendored
@ -1,7 +1,7 @@
|
|||||||
systemd-initctl.service
|
systemd-initctl.service
|
||||||
systemd-logger.service
|
systemd-logger.service
|
||||||
syslog.target
|
syslog.target
|
||||||
basic.target
|
sysinit.target
|
||||||
graphical.target
|
graphical.target
|
||||||
multi-user.target
|
multi-user.target
|
||||||
getty@.service
|
getty@.service
|
||||||
|
14
units/basic.target
Normal file
14
units/basic.target
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
# See systemd.special(7) for details
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Basic System
|
||||||
|
Requires=sysinit.target local-fs.target swap.target sockets.target
|
||||||
|
After=sysinit.target local-fs.target swap.target sockets.target
|
||||||
|
OnlyByDependency=yes
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Huge Pages File System Automount Point
|
Description=Huge Pages File System Automount Point
|
||||||
Before=basic.target
|
Before=sysinit.target
|
||||||
|
|
||||||
[Automount]
|
[Automount]
|
||||||
Where=/dev/hugepages
|
Where=/dev/hugepages
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=POSIX Message Queue File System Automount Point
|
Description=POSIX Message Queue File System Automount Point
|
||||||
Before=basic.target
|
Before=sysinit.target
|
||||||
|
|
||||||
[Automount]
|
[Automount]
|
||||||
Where=/dev/mqueue
|
Where=/dev/mqueue
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Arbitrary Executable File Formats File System Automount Point
|
Description=Arbitrary Executable File Formats File System Automount Point
|
||||||
Before=basic.target
|
Before=sysinit.target
|
||||||
|
|
||||||
[Automount]
|
[Automount]
|
||||||
Where=/proc/sys/fs/binfmt_misc
|
Where=/proc/sys/fs/binfmt_misc
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Debug File System Automount Point
|
Description=Debug File System Automount Point
|
||||||
Before=basic.target
|
Before=sysinit.target
|
||||||
|
|
||||||
[Automount]
|
[Automount]
|
||||||
Where=/sys/kernel/debug
|
Where=/sys/kernel/debug
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Security File System Automount Point
|
Description=Security File System Automount Point
|
||||||
Before=basic.target
|
Before=sysinit.target
|
||||||
|
|
||||||
[Automount]
|
[Automount]
|
||||||
Where=/sys/kernel/security
|
Where=/sys/kernel/security
|
||||||
|
@ -8,9 +8,7 @@
|
|||||||
# See systemd.special(7) for details
|
# See systemd.special(7) for details
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Basic System
|
Description=Systemd Initialization
|
||||||
Requires=local-fs.target swap.target sockets.target
|
|
||||||
After=local-fs.target swap.target sockets.target
|
|
||||||
Conflicts=emergency.service
|
Conflicts=emergency.service
|
||||||
OnlyByDependency=yes
|
OnlyByDependency=yes
|
||||||
m4_dnl
|
m4_dnl
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=systemd /dev/initctl Compatibility Socket
|
Description=systemd /dev/initctl Compatibility Socket
|
||||||
|
After=sysinit.target
|
||||||
|
|
||||||
[Socket]
|
[Socket]
|
||||||
ListenFIFO=/dev/initctl
|
ListenFIFO=/dev/initctl
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=systemd Logging Socket
|
Description=systemd Logging Socket
|
||||||
|
After=sysinit.target
|
||||||
|
|
||||||
[Socket]
|
[Socket]
|
||||||
ListenStream=@/org/freedesktop/systemd1/logger
|
ListenStream=@/org/freedesktop/systemd1/logger
|
||||||
|
Loading…
Reference in New Issue
Block a user