]> err.no Git - systemd/commitdiff
manager: merge /etc/xdg/systemd/session and /etc/systemd/session
authorLennart Poettering <lennart@poettering.net>
Fri, 14 May 2010 00:50:19 +0000 (02:50 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 14 May 2010 00:50:19 +0000 (02:50 +0200)
Makefile.am
manager.c

index 87c686b93165c44b7bafd068284fcedc2c1c194c..26a2c95850387bb7157d116159c5dc7e81860737 100644 (file)
@@ -250,3 +250,8 @@ CLEANFILES = \
        systemadm.c \
        systemd-initctl.service \
        systemd-logger.service
+
+install-data-hook:
+       $(MKDIR_P) $(DESTDIR)$(pkgsysconfdir)/system $(DESTDIR)$(pkgsysconfdir)/session $(DESTDIR)$(sysconfdir)/xdg/systemd
+       rm -f $(DESTDIR)$(sysconfdir)/xdg/systemd/session
+       ln -sf $(DESTDIR)$(pkgsysconfdir)/session $(DESTDIR)$(sysconfdir)/xdg/systemd/session
index 46b187658d3534cc52892391e097b2ad6a485f40..88dc64bb655771d56055fa8bf50d29d59b046c15 100644 (file)
--- a/manager.c
+++ b/manager.c
@@ -149,12 +149,12 @@ static char** session_dirs(void) {
         }
 
         if ((e = getenv("XDG_CONFIG_DIRS")))
-                config_dirs = strv_split(e, ":");
-        else
-                config_dirs = strv_new("/etc/xdg", NULL);
+                if (!(config_dirs = strv_split(e, ":")))
+                        goto fail;
 
-        if (!config_dirs)
-                goto fail;
+        /* We don't treat /etc/xdg/systemd here as the spec
+         * suggests because we assume that that is a link to
+         * /etc/systemd/ anyway. */
 
         if ((e = getenv("XDG_DATA_HOME"))) {
                 if (asprintf(&data_home, "%s/systemd/session", e) < 0)