summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2016-07-17 15:27:53 +0100
committerNeil Williams <codehelp@debian.org>2016-07-17 15:27:53 +0100
commit4ab9ab31ec8b302a2643712722424c2dc355f245 (patch)
treef2dc11f10ab4289256d313454bebf40e6c12ed75
parenta8fb7b881836cc75064bee16b52cb4e4558d7b24 (diff)
downloadvmdebootstrap-4ab9ab31ec8b302a2643712722424c2dc355f245.tar.gz
Enable systemd-resolved together with systemd-networkd
- #831439
-rw-r--r--vmdebootstrap/network.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/vmdebootstrap/network.py b/vmdebootstrap/network.py
index 67a0ede..2e74c73 100644
--- a/vmdebootstrap/network.py
+++ b/vmdebootstrap/network.py
@@ -101,3 +101,8 @@ class Networking(Base):
eth.write('\n[Network]\n')
eth.write('DHCP=yes\n')
runcmd(['chroot', rootdir, 'systemctl', 'enable', 'systemd-networkd'])
+
+ self.message('Enabling systemctl-resolved for DNS')
+ runcmd(['chroot', rootdir, 'systemctl', 'enable', 'systemd-resolved'])
+ runcmd(['chroot', rootdir, 'ln', '-sfT',
+ '/run/systemd/resolve/resolv.conf', '/etc/resolv.conf'])