Skip to content
Snippets Groups Projects
Commit a3a5d87b authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

fix help and usage call

parent 37e682d1
No related branches found
No related tags found
No related merge requests found
......@@ -139,6 +139,12 @@ int ssexec_reconfigure(int argc, char const *const *argv, ssexec_t *info)
char const *prog = PROG ;
char const *newargv[nargc] ;
char const *help = info->help ;
char const *usage = info->usage ;
info->help = help_stop ;
info->usage = usage_stop ;
newargv[m++] = "stop" ;
if (siglen)
newargv[m++] = "-P" ;
......@@ -159,6 +165,9 @@ int ssexec_reconfigure(int argc, char const *const *argv, ssexec_t *info)
if (e)
goto freed ;
info->help = help ;
info->usage = usage ;
info->treename.len = 0 ;
if (!auto_stra(&info->treename, tree))
log_die_nomem("stralloc") ;
......@@ -176,6 +185,12 @@ int ssexec_reconfigure(int argc, char const *const *argv, ssexec_t *info)
char const *prog = PROG ;
char const *newargv[nargc] ;
char const *help = info->help ;
char const *usage = info->usage ;
info->help = help_start ;
info->usage = usage_start ;
newargv[m++] = "start" ;
if (siglen)
newargv[m++] = "-P" ;
......@@ -192,6 +207,9 @@ int ssexec_reconfigure(int argc, char const *const *argv, ssexec_t *info)
PROG= "start" ;
e = ssexec_start(m, newargv, info) ;
PROG = prog ;
info->help = help ;
info->usage = usage ;
}
freed:
......
......@@ -185,6 +185,12 @@ int ssexec_remove(int argc, char const *const *argv, ssexec_t *info)
char const *newargv[nargc] ;
unsigned int m = 0 ;
char const *help = info->help ;
char const *usage = info->usage ;
info->help = help_stop ;
info->usage = usage_stop ;
newargv[m++] = "stop" ;
newargv[m++] = "-u" ;
if (siglen)
......@@ -199,6 +205,9 @@ int ssexec_remove(int argc, char const *const *argv, ssexec_t *info)
if (ssexec_stop(nargc, newargv, info))
log_dieu(LOG_EXIT_SYS, "stop service selection") ;
PROG = prog ;
info->help = help ;
info->usage = usage ;
}
for (pos = 0 ; pos < areslen ; pos++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment