summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-10-31 02:55:04 +0100
committerLennart Poettering <lennart@poettering.net>2012-10-31 02:55:04 +0100
commit669b04a492e33601e6c34a40bc96ad9ffa11c5a2 (patch)
treeefeaceb9409015786105c7add30f3985c08ba0fb /src
parent630d4e14083fc3798b757604eb2055822b77608b (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/core/service.c6
-rw-r--r--src/core/special.h31
2 files changed, 28 insertions, 9 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 2febdb69d1..cf08485374 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 8923f340ba..ef72260ecd 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@.service"