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 1269-1274
runscript(int argc, char **argv)
Link Here
|
1269 |
applet_list = rc_stringlist_new(); |
1270 |
applet_list = rc_stringlist_new(); |
1270 |
rc_stringlist_add(applet_list, applet); |
1271 |
rc_stringlist_add(applet_list, applet); |
1271 |
|
1272 |
|
|
|
1273 |
if ((extra_commands = rc_service_extra_commands(service)) == NULL) |
1274 |
eerrorx("failed to determine extra commands"); |
1275 |
|
1272 |
/* Now run each option */ |
1276 |
/* Now run each option */ |
1273 |
retval = EXIT_SUCCESS; |
1277 |
retval = EXIT_SUCCESS; |
1274 |
while (optind < argc) { |
1278 |
while (optind < argc) { |
Lines 1287-1293
runscript(int argc, char **argv)
Link Here
|
1287 |
|
1291 |
|
1288 |
doneone = true; |
1292 |
doneone = true; |
1289 |
|
1293 |
|
1290 |
if (strcmp(optarg, "describe") == 0 || |
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 1391-1395
runscript(int argc, char **argv)
Link Here
|
1391 |
usage(EXIT_FAILURE); |
1399 |
usage(EXIT_FAILURE); |
1392 |
} |
1400 |
} |
1393 |
|
1401 |
|
|
|
1402 |
rc_stringlist_free(extra_commands); |
1394 |
return retval; |
1403 |
return retval; |
1395 |
} |
1404 |
} |
1396 |
- |
|
|