From fdc3644c14c5c3ace8fac22c87a2a3dcc0da5a64 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 004945f..26d4672 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -262,6 +262,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 9ea288e..d3b6181 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>kbrequest.target</filename>,
<filename>kexec.target</filename>,
diff --git a/src/core/service.c b/src/core/service.c
index 2a4e691..5db72b8 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -366,6 +366,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 ef72260..15aa6ca 100644
--- a/src/core/special.h
+++ b/src/core/special.h
@@ -87,6 +87,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