46a556f
From 520a6b9454fd4e905298c8b37a8141b764035b17 Mon Sep 17 00:00:00 2001
38eaaea
From: Michal Schmidt <mschmidt@redhat.com>
38eaaea
Date: Fri, 11 Jan 2013 23:22:49 +0100
38eaaea
Subject: [PATCH] (F18) re-add http-daemon.target
38eaaea
38eaaea
Partial revert of 669b04a492e33601e6c34a40bc96ad9ffa11c5a2.
38eaaea
In case someone uses the odd facility names in F18. Who knows.
38eaaea
---
38eaaea
 Makefile.am              |  1 +
38eaaea
 man/systemd.special.xml  |  1 +
38eaaea
 src/core/service.c       |  5 +++++
38eaaea
 src/core/special.h       |  1 +
38eaaea
 units/http-daemon.target | 12 ++++++++++++
38eaaea
 5 files changed, 20 insertions(+)
38eaaea
 create mode 100644 units/http-daemon.target
38eaaea
38eaaea
diff --git a/Makefile.am b/Makefile.am
b3f9281
index 57be908..ce56d05 100644
38eaaea
--- a/Makefile.am
38eaaea
+++ b/Makefile.am
b3f9281
@@ -364,6 +364,7 @@ dist_systemunit_DATA = \
38eaaea
 	units/mail-transfer-agent.target \
38eaaea
 	units/hibernate.target \
38eaaea
 	units/hybrid-sleep.target \
38eaaea
+	units/http-daemon.target \
38eaaea
 	units/poweroff.target \
38eaaea
 	units/reboot.target \
38eaaea
 	units/rescue.target \
38eaaea
diff --git a/man/systemd.special.xml b/man/systemd.special.xml
b3f9281
index b055c6b..2a1c320 100644
38eaaea
--- a/man/systemd.special.xml
38eaaea
+++ b/man/systemd.special.xml
38eaaea
@@ -63,6 +63,7 @@
38eaaea
                 <filename>graphical.target</filename>,
38eaaea
                 <filename>halt.target</filename>,
38eaaea
                 <filename>hibernate.target</filename>,
38eaaea
+                <filename>http-daemon.target</filename>,
38eaaea
                 <filename>hybrid-sleep.target</filename>,
b3f9281
                 <filename>initrd-fs.target</filename>,
38eaaea
                 <filename>kbrequest.target</filename>,
38eaaea
diff --git a/src/core/service.c b/src/core/service.c
b3f9281
index 29e3504..e9e42b4 100644
38eaaea
--- a/src/core/service.c
38eaaea
+++ b/src/core/service.c
b3f9281
@@ -362,6 +362,11 @@ static int sysv_translate_facility(const char *name, const char *filename, char
38eaaea
                 "null",                 NULL,
38eaaea
                 "mail-transport-agent", SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
38eaaea
                 "smtp",                 SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
38eaaea
+
38eaaea
+                /* re-added these for F18 */
38eaaea
+                "MTA",                  SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
38eaaea
+                "smtpdaemon",           SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
38eaaea
+                "httpd",                SPECIAL_HTTP_DAEMON_TARGET,
38eaaea
         };
38eaaea
 
38eaaea
         unsigned i;
38eaaea
diff --git a/src/core/special.h b/src/core/special.h
b3f9281
index d5a0fe8..570cecc 100644
38eaaea
--- a/src/core/special.h
38eaaea
+++ b/src/core/special.h
b3f9281
@@ -91,6 +91,7 @@
38eaaea
  * of a kind. .target units can be used to support multiple
38eaaea
  * implementations that can run side-by-side.
38eaaea
  */
38eaaea
+#define SPECIAL_HTTP_DAEMON_TARGET "http-daemon.target"
38eaaea
 
38eaaea
 /* Magic early boot services */
38eaaea
 #define SPECIAL_FSCK_SERVICE "systemd-fsck@.service"
38eaaea
diff --git a/units/http-daemon.target b/units/http-daemon.target
38eaaea
new file mode 100644
38eaaea
index 0000000..8d018cb
38eaaea
--- /dev/null
38eaaea
+++ b/units/http-daemon.target
38eaaea
@@ -0,0 +1,12 @@
38eaaea
+#  This file is part of systemd.
38eaaea
+#
38eaaea
+#  systemd is free software; you can redistribute it and/or modify it
38eaaea
+#  under the terms of the GNU Lesser General Public License as published by
38eaaea
+#  the Free Software Foundation; either version 2.1 of the License, or
38eaaea
+#  (at your option) any later version.
38eaaea
+
38eaaea
+# This exists mostly for compatibility with SysV/LSB units, and
38eaaea
+# implementations lacking socket/bus activation.
38eaaea
+
38eaaea
+[Unit]
38eaaea
+Description=Web Server