From 7fc3f08ebc20eb496b3d318bb718ece569b10dba Mon Sep 17 00:00:00 2001 From: Shreenidhi Shedi <53473811+sshedi@users.noreply.github.com> Date: Tue, 31 Aug 2021 00:51:10 +0530 Subject: Add support to accept-ra in networkd renderer (#999) Also fix search path in networkd --- cloudinit/net/networkd.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cloudinit/net') diff --git a/cloudinit/net/networkd.py b/cloudinit/net/networkd.py index a311572f..ee6fd2ad 100644 --- a/cloudinit/net/networkd.py +++ b/cloudinit/net/networkd.py @@ -160,6 +160,10 @@ class Renderer(renderer.Renderer): cfg.update_section(sec, 'DHCP', dhcp) + if (dhcp in ['ipv6', 'yes'] and + isinstance(iface.get('accept-ra', ''), bool)): + cfg.update_section(sec, 'IPv6AcceptRA', iface['accept-ra']) + # This is to accommodate extra keys present in VMware config def dhcp_domain(self, d, cfg): for item in ['dhcp4domain', 'dhcp6domain']: @@ -247,7 +251,7 @@ class Renderer(renderer.Renderer): def available(target=None): expected = ['ip', 'systemctl'] - search = ['/usr/bin', '/bin'] + search = ['/usr/sbin', '/bin'] for p in expected: if not subp.which(p, search=search, target=target): return False -- cgit v1.2.3