diff options
author | Shraddha Pandhe <shraddha.pandhe@yahoo.com> | 2014-11-24 19:36:18 +0000 |
---|---|---|
committer | Shraddha Pandhe <shraddha.pandhe@yahoo.com> | 2014-11-24 19:36:18 +0000 |
commit | 4dfba8913a24da7254bf47017a264b28c7a49cd2 (patch) | |
tree | 42b6df90a84b0ff25f85c3e6d098f506f537b02b /cloudinit | |
parent | 563467f2d62def448dbb8bacf33ae25782b2849e (diff) | |
download | vyos-cloud-init-4dfba8913a24da7254bf47017a264b28c7a49cd2.tar.gz vyos-cloud-init-4dfba8913a24da7254bf47017a264b28c7a49cd2.zip |
IPv6 support for rhel distro
- Saw an issue in my earlier commit with multiple NICs. This commit
fixes that issue, along with the indentation issue
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/distros/net_util.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cloudinit/distros/net_util.py b/cloudinit/distros/net_util.py index f56f6ccd..f8c34846 100644 --- a/cloudinit/distros/net_util.py +++ b/cloudinit/distros/net_util.py @@ -169,15 +169,16 @@ def translate_network(settings): real_ifaces[dev_name] = iface_info # Check for those that should be started on boot via 'auto' for (cmd, args) in entries: + args = args.split(None) + if not args: + continue + dev_name = args[0].strip().lower() if cmd == 'auto': # Seems like auto can be like 'auto eth0 eth0:1' so just get the # first part out as the device name - args = args.split(None) - if not args: - continue - dev_name = args[0].strip().lower() if dev_name in real_ifaces: real_ifaces[dev_name]['auto'] = True if cmd == 'iface' and 'inet6' in args: - real_ifaces[dev_name]['inet6'] = True + real_ifaces[dev_name]['inet6'] = True return real_ifaces + |