From e66cf1a3f94fff48a572f6dbd19b43c9bcf7b8c7 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 3 Mar 2014 17:14:07 +0100 Subject: core: introduce new RuntimeDirectory= and RuntimeDirectoryMode= unit settings As discussed on the ML these are useful to manage runtime directories below /run for services. --- src/core/mount.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/mount.c') diff --git a/src/core/mount.c b/src/core/mount.c index 7a92e1ca60..60067d4d75 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -788,6 +788,7 @@ static int mount_spawn(Mount *m, ExecCommand *c, pid_t *_pid) { UNIT(m)->manager->confirm_spawn, UNIT(m)->manager->cgroup_supported, UNIT(m)->cgroup_path, + manager_get_runtime_prefix(UNIT(m)->manager), UNIT(m)->id, 0, NULL, @@ -820,6 +821,8 @@ static void mount_enter_dead(Mount *m, MountResult f) { exec_runtime_destroy(m->exec_runtime); m->exec_runtime = exec_runtime_unref(m->exec_runtime); + exec_context_destroy_runtime_directory(&m->exec_context, manager_get_runtime_prefix(UNIT(m)->manager)); + mount_set_state(m, m->result != MOUNT_SUCCESS ? MOUNT_FAILED : MOUNT_DEAD); } -- cgit v1.2.3-54-g00ecf