From 1e287fe32fd15b1691cbb966feef5fc2f9f6cf7b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 24 May 2010 22:29:59 +0200 Subject: [PATCH] unit: turn display-manager.target into a service --- Makefile.am | 7 +++++-- man/systemd.special.xml.in | 21 +++++++++++++++++++++ src/manager.h | 2 +- src/service.c | 2 +- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 9b0e04f9..f1f9da7a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -517,9 +517,12 @@ install-data-hook: $(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount && \ $(LN_S) ../sys-fs-fuse-connections.automount sys-fs-fuse-connections.automount ) if TARGET_FEDORA + ( cd $(DESTDIR)$(pkgsysconfdir)/system && \ + rm -f display-manager.service && \ + $(LN_S) $(systemunitdir)/prefdm.service display-manager.service ) ( cd $(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants && \ - rm -f prefdm.service && \ - $(LN_S) $(systemunitdir)/prefdm.service prefdm.service ) + rm -f display-manager.service && \ + $(LN_S) ../display-manager.service display-manager.service ) ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \ rm -f rc-local.service && \ $(LN_S) $(systemunitdir)/rc-local.service rc-local.service ) diff --git a/man/systemd.special.xml.in b/man/systemd.special.xml.in index daa93583..1c647e90 100644 --- a/man/systemd.special.xml.in +++ b/man/systemd.special.xml.in @@ -51,6 +51,7 @@ basic.target, ctrl-alt-del.target, default.target, + display-manager.service, emergency.service, graphical.target, halt.target, @@ -147,6 +148,26 @@ kernel command line option. + + display-manager.service + + The display manager + service. Usually this should + be aliased (symlinked) to + gdm.service + or a similar display manager + service. + systemd automatically + adds dependencies of type + After for this target unit to + all SysV init script service + units with an LSB header + referring to the + $x-display-manager + facility, for compatibility + with Debian. + + emergency.service diff --git a/src/manager.h b/src/manager.h index e2f9cf67..22ba04f7 100644 --- a/src/manager.h +++ b/src/manager.h @@ -105,7 +105,7 @@ struct Watch { #define SPECIAL_RPCBIND_TARGET "rpcbind.target" /* LSB's $portmap */ #define SPECIAL_SYSLOG_TARGET "syslog.target" /* LSB's $syslog; Should pull in syslog.socket or syslog.service */ #define SPECIAL_RTC_SET_TARGET "rtc-set.target" /* LSB's $time */ -#define SPECIAL_DISPLAY_MANAGER_TARGET "display-manager.target" /* Debian's $x-display-manager */ +#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_BASIC_TARGET "basic.target" #define SPECIAL_RESCUE_TARGET "rescue.target" diff --git a/src/service.c b/src/service.c index d4b874d6..3fbc0acd 100644 --- a/src/service.c +++ b/src/service.c @@ -203,7 +203,7 @@ static int sysv_translate_facility(const char *name, char **_r) { /* Debian extensions */ "$mail-transport-agent", SPECIAL_MAIL_TRANSFER_AGENT_TARGET, "$mail-transfer-agent", SPECIAL_MAIL_TRANSFER_AGENT_TARGET, - "$x-display-manager", SPECIAL_DISPLAY_MANAGER_TARGET, + "$x-display-manager", SPECIAL_DISPLAY_MANAGER_SERVICE }; unsigned i; -- 2.39.5