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) ...@@ -139,6 +139,12 @@ int ssexec_reconfigure(int argc, char const *const *argv, ssexec_t *info)
char const *prog = PROG ; char const *prog = PROG ;
char const *newargv[nargc] ; 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" ; newargv[m++] = "stop" ;
if (siglen) if (siglen)
newargv[m++] = "-P" ; newargv[m++] = "-P" ;
...@@ -159,6 +165,9 @@ int ssexec_reconfigure(int argc, char const *const *argv, ssexec_t *info) ...@@ -159,6 +165,9 @@ int ssexec_reconfigure(int argc, char const *const *argv, ssexec_t *info)
if (e) if (e)
goto freed ; goto freed ;
info->help = help ;
info->usage = usage ;
info->treename.len = 0 ; info->treename.len = 0 ;
if (!auto_stra(&info->treename, tree)) if (!auto_stra(&info->treename, tree))
log_die_nomem("stralloc") ; log_die_nomem("stralloc") ;
...@@ -176,6 +185,12 @@ int ssexec_reconfigure(int argc, char const *const *argv, ssexec_t *info) ...@@ -176,6 +185,12 @@ int ssexec_reconfigure(int argc, char const *const *argv, ssexec_t *info)
char const *prog = PROG ; char const *prog = PROG ;
char const *newargv[nargc] ; 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" ; newargv[m++] = "start" ;
if (siglen) if (siglen)
newargv[m++] = "-P" ; newargv[m++] = "-P" ;
...@@ -192,6 +207,9 @@ int ssexec_reconfigure(int argc, char const *const *argv, ssexec_t *info) ...@@ -192,6 +207,9 @@ int ssexec_reconfigure(int argc, char const *const *argv, ssexec_t *info)
PROG= "start" ; PROG= "start" ;
e = ssexec_start(m, newargv, info) ; e = ssexec_start(m, newargv, info) ;
PROG = prog ; PROG = prog ;
info->help = help ;
info->usage = usage ;
} }
freed: freed:
......
...@@ -185,6 +185,12 @@ int ssexec_remove(int argc, char const *const *argv, ssexec_t *info) ...@@ -185,6 +185,12 @@ int ssexec_remove(int argc, char const *const *argv, ssexec_t *info)
char const *newargv[nargc] ; char const *newargv[nargc] ;
unsigned int m = 0 ; 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++] = "stop" ;
newargv[m++] = "-u" ; newargv[m++] = "-u" ;
if (siglen) if (siglen)
...@@ -199,6 +205,9 @@ int ssexec_remove(int argc, char const *const *argv, ssexec_t *info) ...@@ -199,6 +205,9 @@ int ssexec_remove(int argc, char const *const *argv, ssexec_t *info)
if (ssexec_stop(nargc, newargv, info)) if (ssexec_stop(nargc, newargv, info))
log_dieu(LOG_EXIT_SYS, "stop service selection") ; log_dieu(LOG_EXIT_SYS, "stop service selection") ;
PROG = prog ; PROG = prog ;
info->help = help ;
info->usage = usage ;
} }
for (pos = 0 ; pos < areslen ; pos++) { for (pos = 0 ; pos < areslen ; pos++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment