lifecycle: support dhcp

This commit is contained in:
Ariadne Conill 2020-07-23 08:55:46 -06:00
parent 4542c8c32f
commit bc9dc32a38

View file

@ -81,6 +81,13 @@ handle_up(const struct lif_execute_opts *opts, struct lif_interface *iface, cons
return false;
}
if (iface->is_dhcp)
{
/* XXX: determine which dhcp client we should use */
if (!lif_execute_fmt(opts, NULL, "/sbin/udhcpc -b -R -p /var/run/udhcpc.%s.pid -i %s", lifname, lifname))
return false;
}
return true;
}