Commit 39834b1d authored by Pavel Emelyanov's avatar Pavel Emelyanov

util: Log scripts running

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent a4525522
...@@ -459,13 +459,17 @@ int run_scripts(char *action) ...@@ -459,13 +459,17 @@ int run_scripts(char *action)
struct script *script; struct script *script;
int ret = 0; int ret = 0;
pr_debug("Running %s scripts\n", action);
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;
} }
list_for_each_entry(script, &opts.scripts, node) list_for_each_entry(script, &opts.scripts, node) {
pr_debug("\t[%s]\n", script->path);
ret |= system(script->path); ret |= system(script->path);
}
unsetenv("CRTOOLS_SCRIPT_ACTION"); unsetenv("CRTOOLS_SCRIPT_ACTION");
return ret; return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment