diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 23c60d5c012..cc6606022b9 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -60,12 +60,14 @@ $XDG_RUNTIME_DIR/systemd/user.control/* $XDG_RUNTIME_DIR/systemd/transient/* $XDG_RUNTIME_DIR/systemd/generator.early/* -~/.config/systemd/user/* +$XDG_CONFIG_HOME/systemd/user/* +$XDG_CONFIG_DIRS/systemd/user/* /etc/systemd/user/* $XDG_RUNTIME_DIR/systemd/user/* /run/systemd/user/* $XDG_RUNTIME_DIR/systemd/generator/* -~/.local/share/systemd/user/* +$XDG_DATA_HOME/systemd/user/* +$XDG_DATA_DIRS/systemd/user/* /usr/lib/systemd/user/* $XDG_RUNTIME_DIR/systemd/generator.late/* @@ -434,6 +436,10 @@ $XDG_CONFIG_HOME/systemd/user or $HOME/.config/systemd/user User configuration ($XDG_CONFIG_HOME is used if set, ~/.config otherwise) + + $XDG_CONFIG_DIRS/systemd/user or /etc/xdg/systemd/user + Additional configuration directories as specified by the XDG base directory specification ($XDG_CONFIG_DIRS is used if set, /etc/xdg otherwise) + /etc/systemd/user User units created by the administrator @@ -455,6 +461,10 @@ $XDG_DATA_HOME/systemd/user or $HOME/.local/share/systemd/user Units of packages that have been installed in the home directory ($XDG_DATA_HOME is used if set, ~/.local/share otherwise) + + $XDG_DATA_DIRS/systemd/user or /usr/local/share/systemd/user and /usr/share/systemd/user + Additional data directories as specified by the XDG base directory specification ($XDG_DATA_DIRS is used if set, /usr/local/share and /usr/share otherwise) + $dir/systemd/user for each $dir in $XDG_DATA_DIRS Additional locations for installed user units, one for each entry in $XDG_DATA_DIRS diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c index 3ea851c3385..e763fd7993f 100644 --- a/src/basic/path-lookup.c +++ b/src/basic/path-lookup.c @@ -181,10 +181,10 @@ static char** user_dirs( if (strv_extend(&res, generator_early) < 0) return NULL; - if (strv_extend_strv_concat(&res, config_dirs, "/systemd/user") < 0) + if (strv_extend(&res, persistent_config) < 0) return NULL; - if (strv_extend(&res, persistent_config) < 0) + if (strv_extend_strv_concat(&res, config_dirs, "/systemd/user") < 0) return NULL; /* global config has lower priority than the user config of the same type */