ifupdown: allow for the executor path to be changed
This commit is contained in:
parent
95a72b5663
commit
dca34ebba7
3 changed files with 12 additions and 1 deletions
|
@ -47,6 +47,7 @@ ifupdown_usage(void)
|
||||||
fprintf(stderr, " -X, --exclude PATTERN never match against interfaces matching PATTERN\n");
|
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, " -n, --no-act do not actually run any commands\n");
|
||||||
fprintf(stderr, " -v, --verbose show what commands are being run\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);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -124,6 +125,7 @@ ifupdown_main(int argc, char *argv[])
|
||||||
{"state-file", required_argument, 0, 'S'},
|
{"state-file", required_argument, 0, 'S'},
|
||||||
{"no-act", no_argument, 0, 'n'},
|
{"no-act", no_argument, 0, 'n'},
|
||||||
{"verbose", no_argument, 0, 'v'},
|
{"verbose", no_argument, 0, 'v'},
|
||||||
|
{"executor-path", required_argument, 0, 'E'},
|
||||||
{NULL, 0, 0, 0}
|
{NULL, 0, 0, 0}
|
||||||
};
|
};
|
||||||
struct match_options match_opts = {};
|
struct match_options match_opts = {};
|
||||||
|
@ -132,7 +134,7 @@ ifupdown_main(int argc, char *argv[])
|
||||||
|
|
||||||
for (;;)
|
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)
|
if (c == -1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -165,6 +167,9 @@ ifupdown_main(int argc, char *argv[])
|
||||||
case 'v':
|
case 'v':
|
||||||
exec_opts.verbose = true;
|
exec_opts.verbose = true;
|
||||||
break;
|
break;
|
||||||
|
case 'E':
|
||||||
|
exec_opts.executor_path = optarg;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,9 @@ configured in the configuration database.
|
||||||
*-v, --verbose*
|
*-v, --verbose*
|
||||||
Show what commands are being run as they are executed.
|
Show what commands are being run as they are executed.
|
||||||
|
|
||||||
|
*-E, --executor-path* _PATH_
|
||||||
|
Look for executors in the given _PATH_.
|
||||||
|
|
||||||
*-I, --include* _PATTERN_
|
*-I, --include* _PATTERN_
|
||||||
Include _PATTERN_ when matching against the config or state
|
Include _PATTERN_ when matching against the config or state
|
||||||
database.
|
database.
|
||||||
|
|
|
@ -31,6 +31,9 @@ configured in the configuration database.
|
||||||
*-v, --verbose*
|
*-v, --verbose*
|
||||||
Show what commands are being run as they are executed.
|
Show what commands are being run as they are executed.
|
||||||
|
|
||||||
|
*-E, --executor-path* _PATH_
|
||||||
|
Look for executors in the given _PATH_.
|
||||||
|
|
||||||
*-I, --include* _PATTERN_
|
*-I, --include* _PATTERN_
|
||||||
Include _PATTERN_ when matching against the config or state
|
Include _PATTERN_ when matching against the config or state
|
||||||
database.
|
database.
|
||||||
|
|
Loading…
Reference in a new issue