diff --git a/criu/action-scripts.c b/criu/action-scripts.c index bfa1f827a..e3027bd2e 100644 --- a/criu/action-scripts.c +++ b/criu/action-scripts.c @@ -23,6 +23,7 @@ static const char *action_names[ACT_MAX] = { [ ACT_NET_UNLOCK ] = "network-unlock", [ ACT_SETUP_NS ] = "setup-namespaces", [ ACT_POST_SETUP_NS ] = "post-setup-namespaces", + [ ACT_PRE_RESUME ] = "pre-resume", [ ACT_POST_RESUME ] = "post-resume", }; diff --git a/criu/cr-restore.c b/criu/cr-restore.c index 4f72977f3..93289c4ec 100644 --- a/criu/cr-restore.c +++ b/criu/cr-restore.c @@ -1843,6 +1843,10 @@ static int restore_root_task(struct pstree_item *init) if (ret == 0) finalize_restore(); + ret = run_scripts(ACT_PRE_RESUME); + if (ret) + pr_err("Pre-resume script ret code %d\n", ret); + if (restore_freezer_state()) pr_err("Unable to restore freezer state\n"); diff --git a/criu/include/action-scripts.h b/criu/include/action-scripts.h index 2e3b25ea3..4421169fd 100644 --- a/criu/include/action-scripts.h +++ b/criu/include/action-scripts.h @@ -11,6 +11,7 @@ enum script_actions { ACT_SETUP_NS, ACT_POST_SETUP_NS, ACT_POST_RESUME, + ACT_PRE_RESUME, ACT_MAX };