ifupdown: allow for the executor path to be changed

This commit is contained in:
Ariadne Conill 2020-07-25 02:22:27 -06:00
parent 95a72b5663
commit dca34ebba7
3 changed files with 12 additions and 1 deletions

View file

@ -47,6 +47,7 @@ ifupdown_usage(void)
fprintf(stderr, " -X, --exclude PATTERN never match against interfaces matching PATTERN\n");
fprintf(stderr, " -n, --no-act do not actually run any commands\n");
fprintf(stderr, " -v, --verbose show what commands are being run\n");
fprintf(stderr, " -E, --executor-path PATH use PATH for executor directory\n");
exit(1);
}
@ -124,6 +125,7 @@ ifupdown_main(int argc, char *argv[])
{"state-file", required_argument, 0, 'S'},
{"no-act", no_argument, 0, 'n'},
{"verbose", no_argument, 0, 'v'},
{"executor-path", required_argument, 0, 'E'},
{NULL, 0, 0, 0}
};
struct match_options match_opts = {};
@ -132,7 +134,7 @@ ifupdown_main(int argc, char *argv[])
for (;;)
{
int c = getopt_long(argc, argv, "hVi:aI:X:S:nv", long_options, NULL);
int c = getopt_long(argc, argv, "hVi:aI:X:S:nvE:", long_options, NULL);
if (c == -1)
break;
@ -165,6 +167,9 @@ ifupdown_main(int argc, char *argv[])
case 'v':
exec_opts.verbose = true;
break;
case 'E':
exec_opts.executor_path = optarg;
break;
}
}

View file

@ -31,6 +31,9 @@ configured in the configuration database.
*-v, --verbose*
Show what commands are being run as they are executed.
*-E, --executor-path* _PATH_
Look for executors in the given _PATH_.
*-I, --include* _PATTERN_
Include _PATTERN_ when matching against the config or state
database.

View file

@ -31,6 +31,9 @@ configured in the configuration database.
*-v, --verbose*
Show what commands are being run as they are executed.
*-E, --executor-path* _PATH_
Look for executors in the given _PATH_.
*-I, --include* _PATTERN_
Include _PATTERN_ when matching against the config or state
database.