Emulate "[inet] autoconf" hostname.if(5) lines with "dhcp"
authorkn <kn@openbsd.org>
Fri, 12 Mar 2021 11:32:03 +0000 (11:32 +0000)
committerkn <kn@openbsd.org>
Fri, 12 Mar 2021 11:32:03 +0000 (11:32 +0000)
commit13c27aa6861b5ddf2842a257786779b4fea490af
treea5946cebcc5f6500edf03948bb36efdaacd39108
parent84f3acfde2a7e7d22afae1b5e404e34b9403abc7
Emulate "[inet] autoconf" hostname.if(5) lines with "dhcp"

With dhcpleased(8) in base, netstart(8) and ifconfig(8) understand both
"autoconf" and "inet autoconf" lines in hostname.if(5) files to signal the
new daemon.

The installer however currently has only dhclient(8), hence manual upgrades
with "[inet] autoconf" instead of "dhcp" in hostname.if files would fail to
establish IPv4 connectivity.

Make install.sub's netstart clone treat autoconf lines like old fashioned
dhcp lines such users^Wearly testers of the new approach don't get stuck in
nyetwork land.

Note that this is only relevant for manual upgrades;  installation always
creates working hostname.if files and automated upgrades with sysupgrade(8)
do not care about network/hostname.if files.

Idea from deraadt
OK deraadt krw ajacoutot
distrib/miniroot/install.sub