From b089c26d4eb78f1729bc8abd50f77b9b0c02e9f0 Mon Sep 17 00:00:00 2001 From: obarun <eric@obarun.org> Date: Thu, 1 Jun 2023 17:11:12 +1100 Subject: [PATCH] users can view the output of the command, not a script --- src/lib66/exec/ssexec_boot.c | 2 +- src/lib66/exec/ssexec_status.c | 7 ++----- src/lib66/exec/ssexec_tree_status.c | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/lib66/exec/ssexec_boot.c b/src/lib66/exec/ssexec_boot.c index 6c6d1cfd..27a434a9 100644 --- a/src/lib66/exec/ssexec_boot.c +++ b/src/lib66/exec/ssexec_boot.c @@ -581,7 +581,7 @@ int ssexec_boot(int argc, char const *const *argv, ssexec_t *info) if (mount("tmpfs", fs, "tmpfs", MS_NODEV | MS_NOSUID, "mode=0755") == -1) sulogin("mount: ",fs) ; } - /** respect the path before run 66-xxx API*/ + /** respect the path before run API*/ if (setenv("PATH", path, 1) == -1) sulogin("set initial PATH: ",path) ; /** create scandir */ { diff --git a/src/lib66/exec/ssexec_status.c b/src/lib66/exec/ssexec_status.c index 601ee30e..9ce93b7a 100644 --- a/src/lib66/exec/ssexec_status.c +++ b/src/lib66/exec/ssexec_status.c @@ -960,11 +960,8 @@ int ssexec_status(int argc, char const *const *argv, ssexec_t *info) if (r < 0) log_dieusys(LOG_EXIT_SYS, "get information of service: ", svname, " -- please make a bug report") ; - if (!r || r == STATE_FLAGS_FALSE) { - /** nothing to do */ - log_1_warn("service: ", svname, " is not parsed -- try to parse it using '66 parse ", svname, "'") ; - goto freed ; - } + if (!r || r == STATE_FLAGS_FALSE) + log_die("service: ", svname, " is not parsed -- try to parse it using '66 parse ", svname, "'") ; if (!resolve_read_g(wres, info->base.s, svname)) log_dieusys(LOG_EXIT_SYS, "read resolve file of: ", svname) ; diff --git a/src/lib66/exec/ssexec_tree_status.c b/src/lib66/exec/ssexec_tree_status.c index e47bacd9..b4d2ce2a 100644 --- a/src/lib66/exec/ssexec_tree_status.c +++ b/src/lib66/exec/ssexec_tree_status.c @@ -107,7 +107,7 @@ static void info_display_enabled(char const *field,char const *treename) { int enabled = tree_isenabled(pinfo->base.s, treename) ; if (enabled < 0) - log_dieu(LOG_EXIT_ZERO, "read resolve file of: ", treename) ; + log_dieu(LOG_EXIT_SYS, "read resolve file of: ", treename) ; if (NOFIELD) info_display_field_name(field) ; if (!bprintf(buffer_1,"%s%s%s",enabled ? log_color->valid : log_color->warning, enabled ? "yes":"no",log_color->off)) -- GitLab