networkd dhcp client - serialize / run stand alone / inject or restart dhcp client
Add Reply
Dimitri John Ledkov
2018-03-09 09:30:11 UTC
Raw Message
I have a request to start/stop/restart the dhcp lease client, and/or
run networkd dhcp client stand alone, or somehow serialize dhcpclient
lease and inject that for networkd-dhcp to pick that up and restart.

For example, Ubuntu initramfs currently does not have networkd in it,
but it can bring interfaces up with dhcp.

And i'm not sure if there is a way to pass/inject the dhcp lease to
networkd as a runtime state to pick up from there. Ideally without
re-acquiring the lease once again.

I'm currently pondering if I should be trying to get networkd running
in the initramfs (without systemd in the initramfs), or like generate
a runtime networkd config for post-pivot to root.

Ideally, it would be nice to ship a "one-shot" dhcp lease acquire
helper binary, that could be shipped in the initramfs, which does
everything using the internal networkd dhcp lease and serializes the
state in /run/. Such that post-pivot, the full networkd can notice
that lease file and start running the longterm dhcp client.

Think, something like $ ipconfig -c dhcp eth0 -> as shipped by klibc-utils

Would such a util, be in-scope, for systemd-networkd?