Skip to content

Commit cec4995

Browse files
committed
Make sure the new runtime dir exists before mounting.
This seems to be required under some choices of runtime dir. Also clean up some redundant logging.
1 parent 757df89 commit cec4995

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/bindings.c

+5
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,11 @@ static int permute_prepare(void)
760760
return -1;
761761
}
762762

763+
if (!mkdir_p(new_runtime, 0755)) {
764+
lxcfs_error("Failed to create dir %s\n", new_runtime);
765+
return -1;
766+
}
767+
763768
if (mount(runtime_path, new_runtime, NULL, MS_BIND, 0) < 0) {
764769
lxcfs_error("Failed to bind-mount %s into new root: %s.\n", runtime_path, strerror(errno));
765770
return -1;

src/lxcfs.c

-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ static bool do_set_runtime_path(const char *path)
192192
return false;
193193
}
194194

195-
lxcfs_info("set runtime path %s", path);
196195
return __set_runtime_path(path);
197196
}
198197

0 commit comments

Comments
 (0)