diff options
author | LaMont Jones <lamont@canonical.com> | 2016-10-31 21:48:44 -0600 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2016-11-03 09:52:04 -0400 |
commit | a1cdebdea65ccd827060c823146992bba9debe19 (patch) | |
tree | 2ba88c1fb56a709808753809bdbb0d12d042f0c6 /cloudinit/net/cmdline.py | |
parent | 59d4ba565718dba1a6c7d61cb5e8d5aa505101fa (diff) | |
download | vyos-cloud-init-a1cdebdea65ccd827060c823146992bba9debe19.tar.gz vyos-cloud-init-a1cdebdea65ccd827060c823146992bba9debe19.zip |
net/cmdline: Further adjustments to ipv6 support
The implementation to add ipv6 support to Ubuntu initramfs changed
(see bug 1621507). The changes here adjust to handle the new path.
Now, the ipv6 route includes using the variable 'DEVICE6' in
net6-DEVICE.conf files.
LP: #1621615
Diffstat (limited to 'cloudinit/net/cmdline.py')
-rw-r--r-- | cloudinit/net/cmdline.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cloudinit/net/cmdline.py b/cloudinit/net/cmdline.py index 933317d5..4075a279 100644 --- a/cloudinit/net/cmdline.py +++ b/cloudinit/net/cmdline.py @@ -76,12 +76,13 @@ def _klibc_to_config_entry(content, mac_addrs=None): data = _load_shell_content(content) try: - name = data['DEVICE'] + name = data['DEVICE'] if 'DEVICE' in data else data['DEVICE6'] except KeyError: - raise ValueError("no 'DEVICE' entry in data") + raise ValueError("no 'DEVICE' or 'DEVICE6' entry in data") # ipconfig on precise does not write PROTO - proto = data.get('PROTO') + # IPv6 config gives us IPV6PROTO, not PROTO. + proto = data.get('PROTO', data.get('IPV6PROTO')) if not proto: if data.get('filename'): proto = 'dhcp' |