From 74c3cc19961d2a329d2edb7decc660be8dd2003c Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Tue, 4 Feb 2014 18:03:00 +0400 Subject: [PATCH] rst: Introduce post-restore action Useful to test restore time -- just abort restore with this action and that's it. Acked-by: Andrew Vagin Signed-off-by: Pavel Emelyanov --- cr-restore.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cr-restore.c b/cr-restore.c index 0336aa751..2bd28799a 100644 --- a/cr-restore.c +++ b/cr-restore.c @@ -1518,6 +1518,13 @@ static int restore_root_task(struct pstree_item *init) timing_stop(TIME_RESTORE); + ret = run_scripts("post-restore"); + if (ret != 0) { + pr_warn("Aborting restore due to script ret code %d\n", ret); + write_stats(RESTORE_STATS); + goto out_kill; + } + ret = attach_to_tasks(); pr_info("Restore finished successfully. Resuming tasks.\n");