Commit eec66f3d authored by Igor Sukhih's avatar Igor Sukhih Committed by Pavel Emelyanov

criu [PATCH] post-setup-namespaces

Introduce post-setup-namespaces action script

It needed to have possibility to run cutom script after mount
namespace is configured
Signed-off-by: 's avatarIgor Sukhih <igor@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent ef8d4cf2
...@@ -19,6 +19,7 @@ static const char *action_names[ACT_MAX] = { ...@@ -19,6 +19,7 @@ static const char *action_names[ACT_MAX] = {
[ ACT_NET_LOCK ] = "network-lock", [ ACT_NET_LOCK ] = "network-lock",
[ ACT_NET_UNLOCK ] = "network-unlock", [ ACT_NET_UNLOCK ] = "network-unlock",
[ ACT_SETUP_NS ] = "setup-namespaces", [ ACT_SETUP_NS ] = "setup-namespaces",
[ ACT_POST_SETUP_NS ] = "post-setup-namespaces",
}; };
int run_scripts(enum script_actions act) int run_scripts(enum script_actions act)
......
...@@ -1992,6 +1992,10 @@ static int restore_root_task(struct pstree_item *init) ...@@ -1992,6 +1992,10 @@ static int restore_root_task(struct pstree_item *init)
if (ret < 0) if (ret < 0)
goto out_kill; goto out_kill;
ret = run_scripts(ACT_POST_SETUP_NS);
if (ret)
goto out_kill;
ret = restore_switch_stage(CR_STATE_FORKING); ret = restore_switch_stage(CR_STATE_FORKING);
if (ret < 0) if (ret < 0)
goto out_kill; goto out_kill;
......
...@@ -17,6 +17,7 @@ enum script_actions { ...@@ -17,6 +17,7 @@ enum script_actions {
ACT_NET_LOCK = 4, ACT_NET_LOCK = 4,
ACT_NET_UNLOCK = 5, ACT_NET_UNLOCK = 5,
ACT_SETUP_NS = 6, ACT_SETUP_NS = 6,
ACT_POST_SETUP_NS = 7,
ACT_MAX ACT_MAX
}; };
......
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