Commit 4cfcbb10 authored by Michael Biebl's avatar Michael Biebl

Map $x-display-manager LSB facility to display-manager.service

...instead of making it a target. Using a target had the downside that
multiple display managers could hook into it at the same time which could
lead to several failed start attempts for the non-default display
manager.
parent fb9ae2b2
systemd (215-14) UNRELEASED; urgency=medium
* Map $x-display-manager LSB facility to display-manager.service instead of
making it a target. Using a target had the downside that multiple display
managers could hook into it at the same time which could lead to several
failed start attempts for the non-default display manager.
-- Michael Biebl <biebl@debian.org> Sat, 28 Mar 2015 09:27:07 +0100
systemd (215-13) unstable; urgency=medium
[ Martin Pitt ]
......
......@@ -3,30 +3,42 @@ Date: Sat, 26 Apr 2014 14:25:41 +0200
Subject: Add targets for compatibility with Debian insserv system facilities
---
Makefile.am | 6 ++++++
units/mail-transport-agent.target | 12 ++++++++++++
units/x-display-manager.target | 12 ++++++++++++
3 files changed, 30 insertions(+)
Makefile.am | 5 +++++
src/sysv-generator/sysv-generator.c | 3 +++
units/mail-transport-agent.target | 12 ++++++++++++
3 files changed, 20 insertions(+)
create mode 100644 units/mail-transport-agent.target
create mode 100644 units/x-display-manager.target
diff --git a/Makefile.am b/Makefile.am
index ce93c8c..6f4df22 100644
index ce93c8c..31c86de 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -539,6 +539,12 @@ nodist_systemunit_DATA = \
@@ -539,6 +539,11 @@ nodist_systemunit_DATA = \
units/systemd-nspawn@.service \
units/systemd-update-done.service
+if HAVE_SYSV_COMPAT
+nodist_systemunit_DATA += \
+ units/x-display-manager.target \
+ units/mail-transport-agent.target
+endif
+
dist_userunit_DATA = \
units/user/basic.target \
units/user/default.target \
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
index b7837d8..7931e90 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
@@ -277,6 +277,9 @@ static int sysv_translate_facility(const char *name, const char *filename, char
"remote_fs", SPECIAL_REMOTE_FS_TARGET,
"syslog", NULL,
"time", SPECIAL_TIME_SYNC_TARGET,
+ /* Debian defined facilities */
+ "x-display-manager", "display-manager.service",
+ "mail-transport-agent", "mail-transport-agent.target",
};
unsigned i;
diff --git a/units/mail-transport-agent.target b/units/mail-transport-agent.target
new file mode 100644
index 0000000..4d74ec7
......@@ -45,21 +57,3 @@ index 0000000..4d74ec7
+[Unit]
+Description=Mail Transport Agent
+RefuseManualStart=yes
diff --git a/units/x-display-manager.target b/units/x-display-manager.target
new file mode 100644
index 0000000..a528dff
--- /dev/null
+++ b/units/x-display-manager.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
+# depending on the $x-display-manager system facility.
+[Unit]
+Description=X11 Display Manager
+RefuseManualStart=yes
......@@ -3,27 +3,29 @@ Date: Fri, 11 Jul 2014 02:15:37 +0200
Subject: Map rcS.d init script dependencies to their systemd equivalent.
---
src/sysv-generator/sysv-generator.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
src/sysv-generator/sysv-generator.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
index 820d79e..677fac4 100644
index ea864c1..635e0c7 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
@@ -248,8 +248,15 @@ static int sysv_translate_facility(const char *name, const char *filename, char
@@ -283,11 +283,17 @@ static int sysv_translate_facility(const char *name, const char *filename, char
"named", SPECIAL_NSS_LOOKUP_TARGET,
"portmap", SPECIAL_RPCBIND_TARGET,
"remote_fs", SPECIAL_REMOTE_FS_TARGET,
- "syslog", NULL,
+ "syslog", "systemd-journald-dev-log.socket",
"time", SPECIAL_TIME_SYNC_TARGET,
/* Debian defined facilities */
"x-display-manager", "display-manager.service",
"mail-transport-agent", "mail-transport-agent.target",
+ /* special rcS init scripts */
+ "cryptdisks", "cryptsetup.target",
+ "mountall", SPECIAL_LOCAL_FS_TARGET,
+ "mountnfs", SPECIAL_REMOTE_FS_TARGET,
+ "checkroot", "systemd-remount-fs.service",
+ "dbus", "dbus.socket",
+
};
unsigned i;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment