2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 09:58:09 +00:00

scripts: Exit early if no scripts passed

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov 2014-11-13 23:24:00 +04:00 committed by Pavel Emelyanov
parent 61b8c9dac3
commit b6c3270b2f

View File

@ -28,6 +28,9 @@ int run_scripts(enum script_actions act)
pr_debug("Running %s scripts\n", action); pr_debug("Running %s scripts\n", action);
if (unlikely(list_empty(&opts.scripts)))
return 0;
if (setenv("CRTOOLS_SCRIPT_ACTION", action, 1)) { if (setenv("CRTOOLS_SCRIPT_ACTION", action, 1)) {
pr_perror("Can't set CRTOOLS_SCRIPT_ACTION=%s", action); pr_perror("Can't set CRTOOLS_SCRIPT_ACTION=%s", action);
return -1; return -1;