From 6dbd79a0928351def5976d849f941acd60670d74 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 22 Jun 2021 21:39:51 +0200 Subject: [PATCH] helpers: fix return value of exec_controlscript() too Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/438cdca55c7b15c743c36e4664b65bb762fe091e Author: vanhofen Date: 2021-06-22 (Tue, 22 Jun 2021) Origin message was: ------------------ - helpers: fix return value of exec_controlscript() too ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/system/helpers.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index 837848cd6..9134a3880 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -560,12 +560,12 @@ bool exec_controlscript(std::string script) if (access((std::string)CONTROLDIR_VAR + "/" + script.c_str(), X_OK) == 0) controlscript = (std::string)CONTROLDIR_VAR + "/" + script; - dprintf(DEBUG_NORMAL, "executing %s\n", controlscript.c_str()); + dprintf(DEBUG_DEBUG, "executing %s\n", controlscript.c_str()); int ret = my_system(controlscript.c_str()); if (ret) - dprintf(DEBUG_NORMAL, "exec control script [%s] failed\n", controlscript.c_str()); + dprintf(DEBUG_NORMAL, "Error: [helpers] exec control script [%s] failed\n", controlscript.c_str()); - return ret; + return ret == 0 ? true : false; } bool exec_initscript(std::string script, std::string command, std::string system_command)