From e1918f3fd574e5161ba9dc59573eab8a15f93708 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Tue, 28 Jul 2020 08:23:58 -0600 Subject: [PATCH] ifupdown: add --force for compatibility with busybox ifupdown --- cmd/ifupdown.c | 4 ++++ doc/ifdown.scd | 4 ++++ doc/ifup.scd | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/cmd/ifupdown.c b/cmd/ifupdown.c index 2765498..66ef4cb 100644 --- a/cmd/ifupdown.c +++ b/cmd/ifupdown.c @@ -49,6 +49,7 @@ ifupdown_usage(void) 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"); + fprintf(stderr, " -f, --force force (de)configuration\n"); exit(1); } @@ -127,6 +128,7 @@ ifupdown_main(int argc, char *argv[]) {"no-act", no_argument, 0, 'n'}, {"verbose", no_argument, 0, 'v'}, {"executor-path", required_argument, 0, 'E'}, + {"force", no_argument, 0, 'f'}, {NULL, 0, 0, 0} }; struct match_options match_opts = {}; @@ -170,6 +172,8 @@ ifupdown_main(int argc, char *argv[]) case 'E': exec_opts.executor_path = optarg; break; + case 'f': + break; } } diff --git a/doc/ifdown.scd b/doc/ifdown.scd index 051140b..15ff53d 100644 --- a/doc/ifdown.scd +++ b/doc/ifdown.scd @@ -18,6 +18,10 @@ configured in the configuration database. *-a, --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* Display supported options to ifquery. diff --git a/doc/ifup.scd b/doc/ifup.scd index 5d9c8d9..f0a7ed3 100644 --- a/doc/ifup.scd +++ b/doc/ifup.scd @@ -18,6 +18,10 @@ configured in the configuration database. *-a, --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* Display supported options to ifquery.