chiark / gitweb /
units: introduce and explain sysinit.target
authorLennart Poettering <lennart@poettering.net>
Fri, 4 Jun 2010 16:43:40 +0000 (18:43 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 4 Jun 2010 16:43:40 +0000 (18:43 +0200)
14 files changed:
Makefile.am
man/systemd.special.xml.in
src/manager.h
src/service.c
units/.gitignore
units/basic.target [new file with mode: 0644]
units/dev-hugepages.automount
units/dev-mqueue.automount
units/proc-sys-fs-binfmt_misc.automount
units/sys-kernel-debug.automount
units/sys-kernel-security.automount
units/sysinit.target.m4 [moved from units/basic.target.m4 with 80% similarity]
units/systemd-initctl.socket
units/systemd-logger.socket

index b255b7a1f6881e0e7a15fddaa5ba4c08f6b4bb0a..28e52fee2fa7d709b7045e08bbadf2118f245311 100644 (file)
@@ -87,6 +87,7 @@ interface_DATA = \
 
 dist_systemunit_DATA = \
        units/emergency.service \
+       units/basic.target \
        units/getty.target \
        units/halt.target \
        units/local-fs.target \
@@ -119,7 +120,7 @@ dist_systemunit_DATA = \
        units/var-run.mount
 
 systemunit_DATA = \
-       units/basic.target \
+       units/sysinit.target \
        units/getty@.service \
        units/graphical.target \
        units/multi-user.target \
@@ -135,7 +136,7 @@ sessionunit_DATA = \
        units/session/exit.service
 
 EXTRA_DIST = \
-       units/basic.target.m4 \
+       units/sysinit.target.m4 \
        units/getty@.service.m4 \
        units/graphical.target.m4 \
        units/multi-user.target.m4 \
@@ -398,7 +399,7 @@ CLEANFILES = \
        units/systemd-initctl.service \
        units/systemd-logger.service \
        units/syslog.target \
-       units/basic.target \
+       units/sysinit.target \
        units/getty@.service \
        units/graphical.target \
        units/multi-user.target \
@@ -470,7 +471,7 @@ install-data-hook:
                $(DESTDIR)$(systemunitdir) \
                $(DESTDIR)$(sessionunitdir) \
                $(DESTDIR)$(systemunitdir)/sockets.target.wants \
-               $(DESTDIR)$(systemunitdir)/basic.target.wants \
+               $(DESTDIR)$(systemunitdir)/sysinit.target.wants \
                $(DESTDIR)$(pkgsysconfdir)/system \
                $(DESTDIR)$(pkgsysconfdir)/system/getty.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@tty6.service )
        ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
-               rm -f getty.target && \
-               $(LN_S) $(systemunitdir)/getty.target getty.target )
-       ( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
+               rm -f getty.target remote-fs.target && \
+               $(LN_S) $(systemunitdir)/getty.target getty.target && \
+               $(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
+       ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
                rm -f dev-hugepages.automount \
                        dev-mqueue.automount \
                        proc-sys-fs-binfmt_misc.automount \
index 1d9c1326b4f2e5d43634f2eee69d54c2407c06a8..a2e1bb2cbd594c06a46e446739e4296202b64448 100644 (file)
@@ -80,6 +80,7 @@
                 <filename>sigpwr.target</filename>,
                 <filename>sockets.target</filename>,
                 <filename>swap.target</filename>,
+                <filename>sysinit.target</filename>,
                 <filename>syslog.target</filename>,
                 <filename>@SPECIAL_SYSLOG_SERVICE@</filename>,
                 <filename>systemd-initctl.service</filename>,
                                         target unit to all SysV
                                         service units configured for
                                         runlevel 1 to 5.</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>
+                                        <para>Usually this should pull
+                                        in all sockets, mount points,
+                                        swap devices and other basic
+                                        initialization necessary for
+                                        the general purpose
+                                        daemons. Most normal daemon
+                                        should have dependencies of
+                                        type After and Requires on
+                                        this unit.</para>
                                 </listitem>
                         </varlistentry>
                         <varlistentry>
                                         service).</para>
                                 </listitem>
                         </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>
                                 <term><filename>@SPECIAL_SYSLOG_SERVICE@</filename></term>
                                 <listitem>
index 210e66053cde9847c949eb548c725b67e3d89104..a2084e924bae6ec36fe017894426e241ff777961 100644 (file)
@@ -108,6 +108,7 @@ struct Watch {
 #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_BASIC_TARGET "basic.target"
+#define SPECIAL_SYSINIT_TARGET "sysinit.target"
 #define SPECIAL_RESCUE_TARGET "rescue.target"
 #define SPECIAL_EXIT_SERVICE "exit.service"
 
index 2ce95f5a9f2016e38e619e4aeea405e02db6db15..c276a9a27639155d5697a9cbf44246b5a4d2791c 100644 (file)
@@ -58,10 +58,10 @@ static const struct {
         { "rc6.d",  SPECIAL_RUNLEVEL6_TARGET, RUNLEVEL_DOWN },
 
         /* SUSE style boot.d */
-        { "boot.d", SPECIAL_BASIC_TARGET,     RUNLEVEL_BASIC },
+        { "boot.d", SPECIAL_SYSINIT_TARGET,   RUNLEVEL_BASIC },
 
         /* Debian style rcS.d */
-        { "rcS.d",  SPECIAL_BASIC_TARGET,     RUNLEVEL_BASIC },
+        { "rcS.d",  SPECIAL_SYSINIT_TARGET,   RUNLEVEL_BASIC },
 };
 
 #define RUNLEVELS_UP "12345"
index 7e61543864a1edbbd3a5b08511296ddce63b88af..ea85dc081e08de6f78f4e179e27bdaf6226c4c39 100644 (file)
@@ -1,7 +1,7 @@
 systemd-initctl.service
 systemd-logger.service
 syslog.target
-basic.target
+sysinit.target
 graphical.target
 multi-user.target
 getty@.service
diff --git a/units/basic.target b/units/basic.target
new file mode 100644 (file)
index 0000000..aa94b94
--- /dev/null
@@ -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
index 9fef9eeb37e69b9a071988990170178946ab9708..4e7f8ff5a9d3cef212d71438312d8c784890bf32 100644 (file)
@@ -7,7 +7,7 @@
 
 [Unit]
 Description=Huge Pages File System Automount Point
-Before=basic.target
+Before=sysinit.target
 
 [Automount]
 Where=/dev/hugepages
index a24ffe68f5092fadebc1aa603282b8856e6a07e1..4df53dcaa47c43b7623bd590c5500487055cc32e 100644 (file)
@@ -7,7 +7,7 @@
 
 [Unit]
 Description=POSIX Message Queue File System Automount Point
-Before=basic.target
+Before=sysinit.target
 
 [Automount]
 Where=/dev/mqueue
index 4e9b23b938119370a5224e726176ae6c1e0577bb..82369c56b357582451779f0d80bf09e68f59e3bf 100644 (file)
@@ -7,7 +7,7 @@
 
 [Unit]
 Description=Arbitrary Executable File Formats File System Automount Point
-Before=basic.target
+Before=sysinit.target
 
 [Automount]
 Where=/proc/sys/fs/binfmt_misc
index 3d5b52d0494f45912d1061651f0f231343a23613..4da3f20531d9ec4f01bcfc420cb136ccfb059e52 100644 (file)
@@ -7,7 +7,7 @@
 
 [Unit]
 Description=Debug File System Automount Point
-Before=basic.target
+Before=sysinit.target
 
 [Automount]
 Where=/sys/kernel/debug
index 061a5a23addfd5291c0cc4e27d6a802019d8307d..5d8356e513ee94abf949d2a788d5da664d4acd2a 100644 (file)
@@ -7,7 +7,7 @@
 
 [Unit]
 Description=Security File System Automount Point
-Before=basic.target
+Before=sysinit.target
 
 [Automount]
 Where=/sys/kernel/security
similarity index 80%
rename from units/basic.target.m4
rename to units/sysinit.target.m4
index 537ad8daf7a6536d63f27e0de1f7506c229d85f4..68c661ef0286a0ce0537efd7f78a815c7ab0d0eb 100644 (file)
@@ -8,9 +8,7 @@
 # See systemd.special(7) for details
 
 [Unit]
-Description=Basic System
-Requires=local-fs.target swap.target sockets.target
-After=local-fs.target swap.target sockets.target
+Description=Systemd Initialization
 Conflicts=emergency.service
 OnlyByDependency=yes
 m4_dnl
index fdb95deddd36ef141f55824e8d8268620ec864e8..af5cca202ea4df4640b1079bc1802c6ede581461 100644 (file)
@@ -9,6 +9,7 @@
 
 [Unit]
 Description=systemd /dev/initctl Compatibility Socket
+After=sysinit.target
 
 [Socket]
 ListenFIFO=/dev/initctl
index f62b582d3ef21267160224b60a4561ca5027e581..7195a9e85616738521704d5878bfd18a68a9cbeb 100644 (file)
@@ -9,6 +9,7 @@
 
 [Unit]
 Description=systemd Logging Socket
+After=sysinit.target
 
 [Socket]
 ListenStream=@/org/freedesktop/systemd1/logger