chiark / gitweb /
unit: turn display-manager.target into a service
authorLennart Poettering <lennart@poettering.net>
Mon, 24 May 2010 20:29:59 +0000 (22:29 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 24 May 2010 20:29:59 +0000 (22:29 +0200)
Makefile.am
man/systemd.special.xml.in
src/manager.h
src/service.c

index 9b0e04f..f1f9da7 100644 (file)
@@ -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
                $(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 && \
        ( 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 )
        ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
                rm -f rc-local.service && \
                $(LN_S) $(systemunitdir)/rc-local.service rc-local.service )
index daa9358..1c647e9 100644 (file)
@@ -51,6 +51,7 @@
                 <para><filename>basic.target</filename>,
                 <filename>ctrl-alt-del.target</filename>,
                 <filename>default.target</filename>,
                 <para><filename>basic.target</filename>,
                 <filename>ctrl-alt-del.target</filename>,
                 <filename>default.target</filename>,
+                <filename>display-manager.service</filename>,
                 <filename>emergency.service</filename>,
                 <filename>graphical.target</filename>,
                 <filename>halt.target</filename>,
                 <filename>emergency.service</filename>,
                 <filename>graphical.target</filename>,
                 <filename>halt.target</filename>,
                                 </listitem>
                         </varlistentry>
                         <varlistentry>
                                 </listitem>
                         </varlistentry>
                         <varlistentry>
+                                <term><filename>display-manager.service</filename></term>
+                                <listitem>
+                                        <para>The display manager
+                                        service. Usually this should
+                                        be aliased (symlinked) to
+                                        <filename>gdm.service</filename>
+                                        or a similar display manager
+                                        service.</para>
+                                        <para>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
+                                        <literal>$x-display-manager</literal>
+                                        facility, for compatibility
+                                        with Debian.</para>
+                                </listitem>
+                        </varlistentry>
+                        <varlistentry>
                                 <term><filename>emergency.service</filename></term>
                                 <listitem>
                                         <para>A special service unit
                                 <term><filename>emergency.service</filename></term>
                                 <listitem>
                                         <para>A special service unit
index e2f9cf6..22ba04f 100644 (file)
@@ -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_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"
 #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"
index d4b874d..3fbc0ac 100644 (file)
@@ -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,
                 /* 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;
         };
 
         unsigned i;