summaryrefslogtreecommitdiff
path: root/src/mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mount.c')
-rw-r--r--src/mount.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mount.c b/src/mount.c
index 99867172c9..cc49b1993f 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -844,6 +844,10 @@ static void mount_enter_mounting(Mount *m) {
mkdir_p(m->where, m->directory_mode);
+ /* create the source directory for bind-mounts if needed */
+ if (m->parameters_fragment.fstype && strcmp(m->parameters_fragment.fstype, "bind") == 0)
+ mkdir_p(m->parameters_fragment.what, m->directory_mode);
+
if (m->from_fragment)
r = exec_command_set(
m->control_command,