ifupdown: implement --force

This commit is contained in:
Ariadne Conill 2020-09-08 19:17:00 -06:00
parent efe9b60e37
commit b514d31c26
3 changed files with 7 additions and 2 deletions

View file

@ -96,6 +96,9 @@ acquire_state_lock(const char *state_path, const char *lifname)
bool
skip_interface(struct lif_interface *iface, const char *ifname)
{
if (exec_opts.force)
return false;
if (up && iface->refcount > 0)
{
fprintf(stderr, "%s: skipping %s (already configured), use --force to force configuration\n",