diff options
Diffstat (limited to 'src/core/manager.c')
-rw-r--r-- | src/core/manager.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index 9172a244ae..822c7ccfee 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2851,3 +2851,10 @@ Set *manager_get_units_requiring_mounts_for(Manager *m, const char *path) { return hashmap_get(m->units_requiring_mounts_for, streq(p, "/") ? "" : p); } + +const char *manager_get_runtime_prefix(Manager *m) { + + return m->running_as == SYSTEMD_SYSTEM ? + "/run" : + getenv("XDG_RUNTIME_DIR"); +} |