Commit 70bb57e2 authored by Pavel Emelyanov's avatar Pavel Emelyanov

restore: Run setup-ns scripts before restoring them

We should call external scripts when namespaces are created,
but before we try to fill them with data from images.

This is done so e.g. to make it possible to push external net
links to netns.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 39834b1d
...@@ -1263,6 +1263,9 @@ static int restore_task_with_children(void *_arg) ...@@ -1263,6 +1263,9 @@ static int restore_task_with_children(void *_arg)
/* Restore root task */ /* Restore root task */
if (current->parent == NULL) { if (current->parent == NULL) {
if (restore_finish_stage(CR_STATE_RESTORE_NS) < 0)
exit(1);
if (collect_mount_info(getpid())) if (collect_mount_info(getpid()))
exit(1); exit(1);
...@@ -1277,9 +1280,6 @@ static int restore_task_with_children(void *_arg) ...@@ -1277,9 +1280,6 @@ static int restore_task_with_children(void *_arg)
if (mount_proc()) if (mount_proc())
exit(1); exit(1);
if (restore_finish_stage(CR_STATE_RESTORE_NS) < 0)
exit(1);
if (root_prepare_shared()) if (root_prepare_shared())
exit(1); exit(1);
} }
......
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