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:
parent
61b8c9dac3
commit
b6c3270b2f
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user