ifupdown: add --force for compatibility with busybox ifupdown
This commit is contained in:
parent
7af585e738
commit
e1918f3fd5
3 changed files with 12 additions and 0 deletions
|
@ -49,6 +49,7 @@ ifupdown_usage(void)
|
||||||
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");
|
fprintf(stderr, " -E, --executor-path PATH use PATH for executor directory\n");
|
||||||
|
fprintf(stderr, " -f, --force force (de)configuration\n");
|
||||||
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -127,6 +128,7 @@ ifupdown_main(int argc, char *argv[])
|
||||||
{"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'},
|
{"executor-path", required_argument, 0, 'E'},
|
||||||
|
{"force", no_argument, 0, 'f'},
|
||||||
{NULL, 0, 0, 0}
|
{NULL, 0, 0, 0}
|
||||||
};
|
};
|
||||||
struct match_options match_opts = {};
|
struct match_options match_opts = {};
|
||||||
|
@ -170,6 +172,8 @@ ifupdown_main(int argc, char *argv[])
|
||||||
case 'E':
|
case 'E':
|
||||||
exec_opts.executor_path = optarg;
|
exec_opts.executor_path = optarg;
|
||||||
break;
|
break;
|
||||||
|
case 'f':
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,10 @@ configured in the configuration database.
|
||||||
*-a, --auto*
|
*-a, --auto*
|
||||||
Only match interfaces that are marked as _auto_.
|
Only match interfaces that are marked as _auto_.
|
||||||
|
|
||||||
|
*-f, --force*
|
||||||
|
Force deconfiguration of the interface.
|
||||||
|
This option exists for compatibility with other implementations.
|
||||||
|
|
||||||
*-h, --help*
|
*-h, --help*
|
||||||
Display supported options to ifquery.
|
Display supported options to ifquery.
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,10 @@ configured in the configuration database.
|
||||||
*-a, --auto*
|
*-a, --auto*
|
||||||
Only match interfaces that are marked as _auto_.
|
Only match interfaces that are marked as _auto_.
|
||||||
|
|
||||||
|
*-f, --force*
|
||||||
|
Force configuration of the interface.
|
||||||
|
This option exists for compatibility with other implementations.
|
||||||
|
|
||||||
*-h, --help*
|
*-h, --help*
|
||||||
Display supported options to ifquery.
|
Display supported options to ifquery.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue