summaryrefslogtreecommitdiff
path: root/src/systemd
diff options
context:
space:
mode:
authorzsdc <taras@vyos.io>2021-12-30 00:41:31 +0200
committerzsdc <taras@vyos.io>2021-12-30 00:41:31 +0200
commitce77935eeeabcbb8d3510d09d12e0d79e74ad045 (patch)
tree4be24440155d97a62a5ae1177c677728f2f64d98 /src/systemd
parent6414138a9c5bc55c5a0037ffa523a14b76e814af (diff)
downloadvyos-1x-ce77935eeeabcbb8d3510d09d12e0d79e74ad045.tar.gz
vyos-1x-ce77935eeeabcbb8d3510d09d12e0d79e74ad045.zip
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.
Diffstat (limited to 'src/systemd')
-rw-r--r--src/systemd/vyos-hostsd.service2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemd/vyos-hostsd.service b/src/systemd/vyos-hostsd.service
index b77335778..4da55f518 100644
--- a/src/systemd/vyos-hostsd.service
+++ b/src/systemd/vyos-hostsd.service
@@ -7,7 +7,7 @@ DefaultDependencies=no
# Seemingly sensible way to say "as early as the system is ready"
# All vyos-hostsd needs is read/write mounted root
-After=systemd-remount-fs.service
+After=systemd-remount-fs.service cloud-init.service
[Service]
WorkingDirectory=/run/vyos-hostsd