diff options
author | dermotbradley <dermot_bradley@yahoo.com> | 2020-11-09 17:24:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-09 12:24:55 -0500 |
commit | 57349eb7df1c422d9e9558e54b201c85778997ae (patch) | |
tree | c6371d6ebc7b4f31a9898d2e4abaa64cb3cacd4b /cloudinit/net/sysconfig.py | |
parent | 0dc2d0304a7fa33af18475b99e808fbcdcad44f2 (diff) | |
download | vyos-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/sysconfig.py')
-rw-r--r-- | cloudinit/net/sysconfig.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py index b0eecc44..a930e612 100644 --- a/cloudinit/net/sysconfig.py +++ b/cloudinit/net/sysconfig.py @@ -367,6 +367,11 @@ class Renderer(renderer.Renderer): if new_key: iface_cfg[new_key] = old_value + # only set WakeOnLan for physical interfaces + if ('wakeonlan' in iface and iface['wakeonlan'] and + iface['type'] == 'physical'): + iface_cfg['ETHTOOL_OPTS'] = 'wol g' + @classmethod def _render_subnets(cls, iface_cfg, subnets, has_default_route, flavor): # setting base values |