mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
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: Igor Sukhih <igor@parallels.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
ef8d4cf285
commit
eec66f3d30
3 changed files with 6 additions and 0 deletions
|
|
@ -19,6 +19,7 @@ static const char *action_names[ACT_MAX] = {
|
|||
[ ACT_NET_LOCK ] = "network-lock",
|
||||
[ ACT_NET_UNLOCK ] = "network-unlock",
|
||||
[ ACT_SETUP_NS ] = "setup-namespaces",
|
||||
[ ACT_POST_SETUP_NS ] = "post-setup-namespaces",
|
||||
};
|
||||
|
||||
int run_scripts(enum script_actions act)
|
||||
|
|
|
|||
|
|
@ -1992,6 +1992,10 @@ static int restore_root_task(struct pstree_item *init)
|
|||
if (ret < 0)
|
||||
goto out_kill;
|
||||
|
||||
ret = run_scripts(ACT_POST_SETUP_NS);
|
||||
if (ret)
|
||||
goto out_kill;
|
||||
|
||||
ret = restore_switch_stage(CR_STATE_FORKING);
|
||||
if (ret < 0)
|
||||
goto out_kill;
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ enum script_actions {
|
|||
ACT_NET_LOCK = 4,
|
||||
ACT_NET_UNLOCK = 5,
|
||||
ACT_SETUP_NS = 6,
|
||||
ACT_POST_SETUP_NS = 7,
|
||||
|
||||
ACT_MAX
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue