diff options
author | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-04-04 14:58:01 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-04-04 14:58:01 +0200 |
commit | 04a23330e4a2085ee91980c223c5e4f089ebbe97 (patch) | |
tree | da0b02615fb21849a37cf4632c80df1569788dff /servicecmd | |
parent | aa1356cb190a3416936b25f75ecaaa8684c6fcde (diff) |
Merge preprocessing of command lines
- Common function for splitting string into argument vector
- Preprocess & split command lines while parsing the service file
- Specify "before" and "after" dependencies in a single line
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'servicecmd')
-rw-r--r-- | servicecmd/list.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/servicecmd/list.c b/servicecmd/list.c index 18b043f..404bddc 100644 --- a/servicecmd/list.c +++ b/servicecmd/list.c @@ -32,17 +32,17 @@ static void print_services(service_t *svc) if (svc->type == SVC_RESPAWN && svc->rspwn_limit > 0) printf("\tRespawn limit: %d\n", svc->rspwn_limit); - if (svc->num_before) { + if (svc->before != NULL) { fputs("\tMust be run before:\n", stdout); - for (i = 0; i < svc->num_before; ++i) + for (i = 0; svc->before[i] != NULL; ++i) printf("\t\t%s\n", svc->before[i]); } - if (svc->num_after) { + if (svc->after != NULL) { fputs("\tMust be run after:\n", stdout); - for (i = 0; i < svc->num_after; ++i) + for (i = 0; svc->after[i] != NULL; ++i) printf("\t\t%s\n", svc->after[i]); } } |