ifupdown: Be consistent in error messages.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
This commit is contained in:
Maximilian Wilhelm 2020-09-25 02:26:21 +02:00
parent 8dc2295006
commit a3d11ded43

View file

@ -103,14 +103,22 @@ skip_interface(struct lif_interface *iface, const char *ifname)
return false;
}
if (exec_opts.force)
return false;
if (iface->has_config_error)
{
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)
{