Lines 1100-1106
runscript(int argc, char **argv)
Link Here
|
1100 |
{ |
1100 |
{ |
1101 |
bool doneone = false; |
1101 |
bool doneone = false; |
1102 |
int retval, opt, depoptions = RC_DEP_TRACE; |
1102 |
int retval, opt, depoptions = RC_DEP_TRACE; |
1103 |
RC_STRING *svc; |
1103 |
RC_STRINGLIST *extra_commands; |
|
|
1104 |
RC_STRING *svc, *command; |
1104 |
char path[PATH_MAX], lnk[PATH_MAX], *dir, *save = NULL, pidstr[10]; |
1105 |
char path[PATH_MAX], lnk[PATH_MAX], *dir, *save = NULL, pidstr[10]; |
1105 |
size_t l = 0, ll; |
1106 |
size_t l = 0, ll; |
1106 |
const char *file; |
1107 |
const char *file; |
Lines 1287-1293
runscript(int argc, char **argv)
Link Here
|
1287 |
|
1288 |
|
1288 |
doneone = true; |
1289 |
doneone = true; |
1289 |
|
1290 |
|
1290 |
if (strcmp(optarg, "describe") == 0 || |
1291 |
if ((extra_commands = rc_service_extra_commands(service)) == NULL) |
|
|
1292 |
eerrorx("failed to determine extra commands"); |
1293 |
|
1294 |
TAILQ_FOREACH(command, extra_commands, entries) |
1295 |
if (strcmp(optarg, command->value) == 0) break; |
1296 |
|
1297 |
if (command != NULL || |
1298 |
strcmp(optarg, "describe") == 0 || |
1291 |
strcmp(optarg, "help") == 0 || |
1299 |
strcmp(optarg, "help") == 0 || |
1292 |
strcmp(optarg, "depend") == 0) |
1300 |
strcmp(optarg, "depend") == 0) |
1293 |
{ |
1301 |
{ |
Lines 1381-1386
runscript(int argc, char **argv)
Link Here
|
1381 |
} else |
1389 |
} else |
1382 |
svc_exec(optarg, NULL); |
1390 |
svc_exec(optarg, NULL); |
1383 |
|
1391 |
|
|
|
1392 |
rc_stringlist_free(extra_commands); |
1393 |
|
1384 |
/* We should ensure this list is empty after |
1394 |
/* We should ensure this list is empty after |
1385 |
* an action is done */ |
1395 |
* an action is done */ |
1386 |
rc_stringlist_free(restart_services); |
1396 |
rc_stringlist_free(restart_services); |
1387 |
- |
|
|