From a3d11ded4306808b7630dbee3d35197d575729f4 Mon Sep 17 00:00:00 2001 From: Maximilian Wilhelm Date: Fri, 25 Sep 2020 02:26:21 +0200 Subject: [PATCH] ifupdown: Be consistent in error messages. Signed-off-by: Maximilian Wilhelm --- cmd/ifupdown.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/cmd/ifupdown.c b/cmd/ifupdown.c index 904eb5b..8723310 100644 --- a/cmd/ifupdown.c +++ b/cmd/ifupdown.c @@ -103,15 +103,23 @@ skip_interface(struct lif_interface *iface, const char *ifname) return false; } - if (exec_opts.force) - return false; - if (iface->has_config_error) { - fprintf(stderr, "%s: skipping interface %s due to config errors\n", argv0, ifname); - return true; + if (exec_opts.force) + { + fprintf(stderr, "%s: (de)configuring interface %s despite config errors\n", argv0, ifname); + return false; + } + else + { + fprintf(stderr, "%s: skipping interface %s due to config errors\n", argv0, ifname); + return true; + } } + if (exec_opts.force) + return false; + if (up && iface->refcount > 0) { if (exec_opts.verbose)