Blob Blame History Raw
From 520a6b9454fd4e905298c8b37a8141b764035b17 Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Fri, 11 Jan 2013 23:22:49 +0100
Subject: [PATCH] (F18) re-add http-daemon.target

Partial revert of 669b04a492e33601e6c34a40bc96ad9ffa11c5a2.
In case someone uses the odd facility names in F18. Who knows.
---
 Makefile.am              |  1 +
 man/systemd.special.xml  |  1 +
 src/core/service.c       |  5 +++++
 src/core/special.h       |  1 +
 units/http-daemon.target | 12 ++++++++++++
 5 files changed, 20 insertions(+)
 create mode 100644 units/http-daemon.target

diff --git a/Makefile.am b/Makefile.am
index 57be908..ce56d05 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -364,6 +364,7 @@ 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 b055c6b..2a1c320 100644
--- a/man/systemd.special.xml
+++ b/man/systemd.special.xml
@@ -63,6 +63,7 @@
                 <filename>graphical.target</filename>,
                 <filename>halt.target</filename>,
                 <filename>hibernate.target</filename>,
+                <filename>http-daemon.target</filename>,
                 <filename>hybrid-sleep.target</filename>,
                 <filename>initrd-fs.target</filename>,
                 <filename>kbrequest.target</filename>,
diff --git a/src/core/service.c b/src/core/service.c
index 29e3504..e9e42b4 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -362,6 +362,11 @@ static int sysv_translate_facility(const char *name, const char *filename, char
                 "null",                 NULL,
                 "mail-transport-agent", SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
                 "smtp",                 SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
+
+                /* re-added these for F18 */
+                "MTA",                  SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
+                "smtpdaemon",           SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
+                "httpd",                SPECIAL_HTTP_DAEMON_TARGET,
         };
 
         unsigned i;
diff --git a/src/core/special.h b/src/core/special.h
index d5a0fe8..570cecc 100644
--- a/src/core/special.h
+++ b/src/core/special.h
@@ -91,6 +91,7 @@
  * of a kind. .target units can be used to support multiple
  * implementations that can run side-by-side.
  */
+#define SPECIAL_HTTP_DAEMON_TARGET "http-daemon.target"
 
 /* Magic early boot services */
 #define SPECIAL_FSCK_SERVICE "systemd-fsck@.service"
diff --git a/units/http-daemon.target b/units/http-daemon.target
new file mode 100644
index 0000000..8d018cb
--- /dev/null
+++ b/units/http-daemon.target
@@ -0,0 +1,12 @@
+#  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