From bc9dc32a38d59a031facb19976b8460e4e03ece1 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Thu, 23 Jul 2020 08:55:46 -0600 Subject: [PATCH] lifecycle: support dhcp --- libifupdown/lifecycle.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libifupdown/lifecycle.c b/libifupdown/lifecycle.c index fda235d..647f6cf 100644 --- a/libifupdown/lifecycle.c +++ b/libifupdown/lifecycle.c @@ -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; }