Unverified Commit b0b84070 by Christian Brauner Committed by GitHub

Merge pull request #2941 from flx42/reorder-mounts

conf: do lxc.mount.entry mounts right after lxc.mount.fstab
parents e9e4dd29 c631115d
...@@ -3546,6 +3546,15 @@ int lxc_setup(struct lxc_handler *handler) ...@@ -3546,6 +3546,15 @@ int lxc_setup(struct lxc_handler *handler)
return -1; return -1;
} }
if (!lxc_list_empty(&lxc_conf->mount_list)) {
ret = setup_mount_entries(lxc_conf, &lxc_conf->rootfs,
&lxc_conf->mount_list, name, lxcpath);
if (ret < 0) {
ERROR("Failed to setup mount entries");
return -1;
}
}
if (lxc_conf->is_execute) { if (lxc_conf->is_execute) {
if (execveat_supported()) { if (execveat_supported()) {
int fd; int fd;
...@@ -3604,15 +3613,6 @@ int lxc_setup(struct lxc_handler *handler) ...@@ -3604,15 +3613,6 @@ int lxc_setup(struct lxc_handler *handler)
} }
} }
if (!lxc_list_empty(&lxc_conf->mount_list)) {
ret = setup_mount_entries(lxc_conf, &lxc_conf->rootfs,
&lxc_conf->mount_list, name, lxcpath);
if (ret < 0) {
ERROR("Failed to setup mount entries");
return -1;
}
}
/* Make sure any start hooks are in the container */ /* Make sure any start hooks are in the container */
if (!verify_start_hooks(lxc_conf)) { if (!verify_start_hooks(lxc_conf)) {
ERROR("Failed to verify start hooks"); ERROR("Failed to verify start hooks");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment