chiark / gitweb /
Fix order and document user unit dirs
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 2 Oct 2014 12:11:21 +0000 (08:11 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 2 Oct 2014 15:11:31 +0000 (11:11 -0400)
Fixup for 718880ba0d 'add a transient user unit directory'.

man/systemd.unit.xml
src/shared/path-lookup.c

index 67d46eda983efd931f194d73fd1ec62d4350e142..ec7ca5634e78fe7a8307754ff0e329a8d5333ff2 100644 (file)
@@ -73,6 +73,7 @@
                 <para><literallayout><filename>$XDG_CONFIG_HOME/systemd/user/*</filename>
 <filename>$HOME/.config/systemd/user/*</filename>
 <filename>/etc/systemd/user/*</filename>
+<filename>$XDG_RUNTIME_DIR/systemd/user/*</filename>
 <filename>/run/systemd/user/*</filename>
 <filename>$XDG_DATA_HOME/systemd/user/*</filename>
 <filename>$HOME/.local/share/systemd/user/*</filename>
                         <entry><filename>/etc/systemd/user</filename></entry>
                         <entry>Local configuration</entry>
                       </row>
+                      <row>
+                        <entry><filename>$XDG_RUNTIME_DIR/systemd/user</filename></entry>
+                        <entry>Runtime units (only used when $XDG_RUNTIME_DIR is set)</entry>
+                      </row>
                       <row>
                         <entry><filename>/run/systemd/user</filename></entry>
                         <entry>Runtime units</entry>
index d7ed6e9e3c2cdaeadd407ab679090dc95a53ab60..8f75a8e83290db85540d544d82af45c4343e2852 100644 (file)
@@ -162,18 +162,18 @@ static char** user_dirs(
                 if (strv_extend(&r, config_home) < 0)
                         goto fail;
 
-        if (runtime_dir)
-                if (strv_extend(&r, runtime_dir) < 0)
+        if (!strv_isempty(config_dirs))
+                if (strv_extend_strv_concat(&r, config_dirs, "/systemd/user") < 0)
                         goto fail;
 
-        if (strv_extend(&r, runtime_unit_path) < 0)
+        if (strv_extend_strv(&r, (char**) config_unit_paths) < 0)
                 goto fail;
 
-        if (!strv_isempty(config_dirs))
-                if (strv_extend_strv_concat(&r, config_dirs, "/systemd/user") < 0)
+        if (runtime_dir)
+                if (strv_extend(&r, runtime_dir) < 0)
                         goto fail;
 
-        if (strv_extend_strv(&r, (char**) config_unit_paths) < 0)
+        if (strv_extend(&r, runtime_unit_path) < 0)
                 goto fail;
 
         if (generator)