diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 67d46eda98..ec7ca5634e 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -73,6 +73,7 @@ $XDG_CONFIG_HOME/systemd/user/* $HOME/.config/systemd/user/* /etc/systemd/user/* +$XDG_RUNTIME_DIR/systemd/user/* /run/systemd/user/* $XDG_DATA_HOME/systemd/user/* $HOME/.local/share/systemd/user/* @@ -343,6 +344,10 @@ /etc/systemd/user Local configuration + + $XDG_RUNTIME_DIR/systemd/user + Runtime units (only used when $XDG_RUNTIME_DIR is set) + /run/systemd/user Runtime units diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c index d7ed6e9e3c..8f75a8e832 100644 --- a/src/shared/path-lookup.c +++ b/src/shared/path-lookup.c @@ -162,13 +162,6 @@ static char** user_dirs( if (strv_extend(&r, config_home) < 0) goto fail; - if (runtime_dir) - if (strv_extend(&r, runtime_dir) < 0) - goto fail; - - if (strv_extend(&r, runtime_unit_path) < 0) - goto fail; - if (!strv_isempty(config_dirs)) if (strv_extend_strv_concat(&r, config_dirs, "/systemd/user") < 0) goto fail; @@ -176,6 +169,13 @@ static char** user_dirs( if (strv_extend_strv(&r, (char**) config_unit_paths) < 0) goto fail; + if (runtime_dir) + if (strv_extend(&r, runtime_dir) < 0) + goto fail; + + if (strv_extend(&r, runtime_unit_path) < 0) + goto fail; + if (generator) if (strv_extend(&r, generator) < 0) goto fail;