dhclient: T4121: Fixed resolv.conf generation at early boot stage
In case if a CLI configuration is not available, dhclient cannot add
nameservers to a resolv.conf file, because vyos-hostsd requires that
an interface be listed in the set system name-server option.
This commit introduces two changes:
- vyos-hostsd service will not be started before Cloud-Init fetch all
remote data. This is required because all meta-data should be available
for Cloud-Init before any of VyOS-related services start since it is
used for configuration generation.
- the vyos-hostsd-client in the dhclient-script will be used only if
the vyos-hostsd is running. In other words - if VyOS services already
started, dhclient changes resolv.conf using vyos-hostsd; in other
cases - does this directly.
These changes should protect us from problems with DHCP during system
boot if DHCP is required by third-party utils.