From: Lennart Poettering Date: Fri, 14 May 2010 00:50:19 +0000 (+0200) Subject: manager: merge /etc/xdg/systemd/session and /etc/systemd/session X-Git-Tag: 0.git+20100605+dfd8ee-1~13^2~36 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4697132b91989da27b11af179c430305bb9db9ac;p=systemd manager: merge /etc/xdg/systemd/session and /etc/systemd/session --- diff --git a/Makefile.am b/Makefile.am index 87c686b9..26a2c958 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/manager.c b/manager.c index 46b18765..88dc64bb 100644 --- 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)