[systemd-commits] 2 commits - Makefile.am TODO man/systemd.special.xml src/core units/http-daemon.target
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Oct 30 18:57:36 PDT 2012
Makefile.am | 1
TODO | 2 +
man/systemd.special.xml | 79 ++++++-----------------------------------------
src/core/service.c | 6 ---
src/core/special.h | 31 ++++++++++++++++--
units/http-daemon.target | 13 -------
6 files changed, 41 insertions(+), 91 deletions(-)
New commits:
commit 173fa08331efefab82cd02b39a3f70e47544d084
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Oct 31 02:57:26 2012 +0100
update TODO
diff --git a/TODO b/TODO
index b03c6aa..ff702d5 100644
--- a/TODO
+++ b/TODO
@@ -19,6 +19,8 @@ F18:
Features:
+* introduce ntp.service (or suchlike) as symlink that is used to arbitrate between various NTP implementations
+
* timer units should get the ability to trigger: a) when CLOCK_REALTIME makes jumps, and b) when DST jumps takes place
* When we begin with system shutdown all kind of suspend/hibernation should be prohibited until shutdown/reboot
commit 669b04a492e33601e6c34a40bc96ad9ffa11c5a2
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Oct 31 02:55:04 2012 +0100
service: drop special HTTP server target, as it is a bad idea anf Fedora specific
This was premarily intended to support the LSB facility $httpd which is
only known by Fedora, and a bad idea since it lacks any real-life
usecase.
Similar, drop support for some other old Fedora-specific facilities.
Also, document the rules for introduction of new facilities, to clarify
the situation for the future.
diff --git a/Makefile.am b/Makefile.am
index 415e0d3..1c04047 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -273,7 +273,6 @@ dist_systemunit_DATA = \
units/mail-transfer-agent.target \
units/hibernate.target \
units/hybrid-sleep.target \
- units/http-daemon.target \
units/poweroff.target \
units/reboot.target \
units/rescue.target \
diff --git a/man/systemd.special.xml b/man/systemd.special.xml
index 6b8e0ec..dc04ee3 100644
--- a/man/systemd.special.xml
+++ b/man/systemd.special.xml
@@ -61,10 +61,9 @@
<filename>final.target</filename>,
<filename>getty.target</filename>,
<filename>graphical.target</filename>,
+ <filename>halt.target</filename>,
<filename>hibernate.target</filename>,
- <filename>http-daemon.target</filename>,
<filename>hybrid-sleep.target</filename>,
- <filename>halt.target</filename>,
<filename>kbrequest.target</filename>,
<filename>kexec.target</filename>,
<filename>local-fs.target</filename>,
@@ -222,8 +221,7 @@
units with a LSB header
referring to the
<literal>$x-display-manager</literal>
- facility, for compatibility
- with Debian.</para>
+ facility.</para>
</listitem>
</varlistentry>
<varlistentry>
@@ -288,22 +286,6 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><filename>http-daemon.target</filename></term>
- <listitem>
- <para>A target for pulling in
- an HTTP server if there is
- any.</para>
- <para>systemd automatically
- adds dependencies of type
- After for this target unit to
- all SysV init script service
- units with a LSB header
- referring to the
- <literal>$httpd</literal>
- facility.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
<term><filename>hybrid-sleep.target</filename></term>
<listitem>
<para>A special target unit
@@ -401,11 +383,7 @@
all SysV init script service
units with an LSB header
referring to the
- <literal>$mail-transfer-agent</literal>
- or
- <literal>$mail-transport-agent</literal>
- facilities, for compatibility
- with Debian.</para>
+ <literal>$mail-transfer-agent</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>
@@ -569,56 +547,21 @@
</varlistentry>
<varlistentry>
<term><filename>runlevel2.target</filename></term>
- <listitem>
- <para>This is a target that is
- called whenever the SysV
- compatibility code asks for
- runlevel 2. It is a good idea
- to make this an alias for
- (i.e. symlink to)
- <filename>multi-user.target</filename>.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
<term><filename>runlevel3.target</filename></term>
- <listitem>
- <para>This is a target that is
- called whenever the SysV
- compatibility code asks for
- runlevel 3. It is a good idea
- to make this an alias for
- (i.e. symlink to)
- <filename>multi-user.target</filename>
- or
- <filename>graphical.target</filename>.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
<term><filename>runlevel4.target</filename></term>
- <listitem>
- <para>This is a target that is
- called whenever the SysV
- compatibility code asks for
- runlevel 4. It is a good idea
- to make this an alias for
- (i.e. symlink to)
- <filename>multi-user.target</filename>
- or
- <filename>graphical.target</filename>.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
<term><filename>runlevel5.target</filename></term>
<listitem>
- <para>This is a target that is
- called whenever the SysV
+ <para>These are targets that
+ are called whenever the SysV
compatibility code asks for
- runlevel 5. It is a good idea
- to make this an alias for
+ runlevel 2, 3, 4, 5,
+ respectively. It is a good
+ idea to make this an alias for
(i.e. symlink to)
<filename>multi-user.target</filename>
- or
- <filename>graphical.target</filename>.</para>
+ (for runlevel 2) or
+ <filename>graphical.target</filename>
+ (the others).</para>
</listitem>
</varlistentry>
<varlistentry>
diff --git a/src/core/service.c b/src/core/service.c
index 2febdb6..cf08485 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -390,12 +390,6 @@ static int sysv_translate_facility(const char *name, const char *filename, char
"mail-transport-agent", SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
#endif
-#ifdef TARGET_FEDORA
- "MTA", SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
- "smtpdaemon", SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
- "httpd", SPECIAL_HTTP_DAEMON_TARGET,
-#endif
-
#ifdef TARGET_SUSE
"smtp", SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
#endif
diff --git a/src/core/special.h b/src/core/special.h
index 8923f34..ef72260 100644
--- a/src/core/special.h
+++ b/src/core/special.h
@@ -59,9 +59,34 @@
#define SPECIAL_RPCBIND_TARGET "rpcbind.target" /* LSB's $portmap */
#define SPECIAL_SYSLOG_TARGET "syslog.target" /* LSB's $syslog */
#define SPECIAL_TIME_SYNC_TARGET "time-sync.target" /* LSB's $time */
-#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_HTTP_DAEMON_TARGET "http-daemon.target"
+#define SPECIAL_DISPLAY_MANAGER_SERVICE "display-manager.service" /* Common extension of LSB */
+#define SPECIAL_MAIL_TRANSFER_AGENT_TARGET "mail-transfer-agent.target" /* Common extension of LSB */
+
+/*
+ * Rules regarding adding further high level targets like the above:
+ *
+ * - Be conservative, only add more of these when we really need
+ * them. We need strong usecases for further additions.
+ *
+ * - When there can be multiple implementations running side-by-side,
+ * it needs to be a .target unit which can pull in all
+ * implementations.
+ *
+ * - If something can be implemented with socket activation, and
+ * without, it needs to be a .target unit, so that it can pull in
+ * the appropriate unit.
+ *
+ * - Otherwise, it should be a .service unit.
+ *
+ * - In some cases it is OK to have both a .service and a .target
+ * unit, i.e. if there can be multiple parallel implementations, but
+ * only one is the "system" one. Example: syslog.
+ *
+ * Or to put this in other words: .service symlinks can be used to
+ * arbitrate between multiple implementations if there can be only one
+ * of a kind. .target units can be used to support multiple
+ * implementations that can run side-by-side.
+ */
/* Magic early boot services */
#define SPECIAL_FSCK_SERVICE "systemd-fsck at .service"
diff --git a/units/http-daemon.target b/units/http-daemon.target
deleted file mode 100644
index 21ce997..0000000
--- a/units/http-daemon.target
+++ /dev/null
@@ -1,13 +0,0 @@
-# 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.
-
-# This exists mostly for compatibility with SysV/LSB units, and
-# implementations lacking socket/bus activation.
-
-[Unit]
-Description=Web Server
-Documentation=man:systemd.special(7)
More information about the systemd-commits
mailing list