From 7c065342c39f410faf2a7b9806ce1c16e774785c Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Sun, 31 Jul 2016 14:47:40 +0100 Subject: Add support for systemd-resolved For Jessie, --enable-dhcp is still needed to get a usable interface other than lo. For Stretch and later, --enable-dhcp is redundant if systemd-networkd is enabled. Add note to the docs. --- vmdebootstrap/network.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'vmdebootstrap') diff --git a/vmdebootstrap/network.py b/vmdebootstrap/network.py index 2e74c73..bed5134 100644 --- a/vmdebootstrap/network.py +++ b/vmdebootstrap/network.py @@ -91,8 +91,6 @@ class Networking(Base): https://coreos.com/os/docs/latest/network-config-with-networkd.html http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ """ - if not self.settings['enable-dhcp']: - return self.message('Enabling systemd-networkd for DHCP') ethpath = os.path.join(rootdir, 'etc', 'systemd', 'network', '99-dhcp.network') with open(ethpath, 'w') as eth: @@ -102,6 +100,10 @@ class Networking(Base): eth.write('DHCP=yes\n') runcmd(['chroot', rootdir, 'systemctl', 'enable', 'systemd-networkd']) + def enable_systemd_resolved(self, rootdir): + """ + only for unstable or testing, not present in jessie + """ self.message('Enabling systemctl-resolved for DNS') runcmd(['chroot', rootdir, 'systemctl', 'enable', 'systemd-resolved']) runcmd(['chroot', rootdir, 'ln', '-sfT', -- cgit v1.2.1