mech: always run initctl in batch mode when in non-interactive mode

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2023-03-14 20:31:50 +01:00
parent 28b6cecb73
commit 90b4a739b5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
int core_commit_done(clicon_handle h, transaction_data td)
{
if (transaction_src(td) && system("initctl reload"))
if (transaction_src(td) && system("initctl -b reload"))
clicon_log(LOG_CRIT, "Failed to reload services");
return 0;
+1 -1
View File
@@ -46,7 +46,7 @@ int ietf_sys_tr_commit_hostname(cxobj *src, cxobj *tgt)
free(old);
if (src)
err = err ? : system("initctl touch sysklogd");
err = err ? : system("initctl -b touch sysklogd");
return err;
}