summaryrefslogtreecommitdiff
path: root/cloudinit/net/eni.py
diff options
context:
space:
mode:
authordermotbradley <dermot_bradley@yahoo.com>2020-11-09 17:24:55 +0000
committerGitHub <noreply@github.com>2020-11-09 12:24:55 -0500
commit57349eb7df1c422d9e9558e54b201c85778997ae (patch)
treec6371d6ebc7b4f31a9898d2e4abaa64cb3cacd4b /cloudinit/net/eni.py
parent0dc2d0304a7fa33af18475b99e808fbcdcad44f2 (diff)
downloadvyos-cloud-init-57349eb7df1c422d9e9558e54b201c85778997ae.tar.gz
vyos-cloud-init-57349eb7df1c422d9e9558e54b201c85778997ae.zip
Make wakeonlan Network Config v2 setting actually work (#626)
Add code so that specifying "wakeonlan: true" actually results in relevant configuration entry appearing in /etc/network/interfaces, Netplan, and sysconfig for RHEL and OpenSuse. Add testcases for the above.
Diffstat (limited to 'cloudinit/net/eni.py')
-rw-r--r--cloudinit/net/eni.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/net/eni.py b/cloudinit/net/eni.py
index 13c041f3..0074691b 100644
--- a/cloudinit/net/eni.py
+++ b/cloudinit/net/eni.py
@@ -401,6 +401,10 @@ class Renderer(renderer.Renderer):
sections = []
subnets = iface.get('subnets', {})
accept_ra = iface.pop('accept-ra', None)
+ ethernet_wol = iface.pop('wakeonlan', None)
+ if ethernet_wol:
+ # Specify WOL setting 'g' for using "Magic Packet"
+ iface['ethernet-wol'] = 'g'
if subnets:
for index, subnet in enumerate(subnets):
ipv4_subnet_mtu = None