diff options
author | Steven Allen <steven@stebalien.com> | 2014-09-28 14:54:25 -0700 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-10-02 10:37:30 -0400 |
commit | 718880ba0d557a045e2f969e141cbd59e78c76f4 (patch) | |
tree | 24adb053b3e39a34f441a0b834013e6c0d28e03c /src/core | |
parent | 9fd290443f5f99fca0dcd4216b1de70f7d3b8db1 (diff) |
add a transient user unit directory
This patch adds a transient user unit directory under
`$XDG_RUNTIME_DIR/systemd/user/` and stores transient user-instance
units (such as those created by `systemd-run --user`) under there
instead of putting them in $XDG_CONFIG_HOME/systemd/user/.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=67331
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/unit.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/unit.c b/src/core/unit.c index 5978e21f56..8a7df01284 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -3080,7 +3080,11 @@ static int unit_drop_in_dir(Unit *u, UnitSetPropertiesMode mode, bool transient, if (u->manager->running_as == SYSTEMD_USER) { int r; - r = user_config_home(dir); + if (mode == UNIT_PERSISTENT && !transient) + r = user_config_home(dir); + else + r = user_runtime(dir); + if (r == 0) return -ENOENT; return r; @@ -3228,7 +3232,7 @@ int unit_make_transient(Unit *u) { if (u->manager->running_as == SYSTEMD_USER) { _cleanup_free_ char *c = NULL; - r = user_config_home(&c); + r = user_runtime(&c); if (r < 0) return r; if (r == 0) |