diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-02-17 10:49:35 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-02-17 10:49:35 -0500 |
commit | 45bff1e1c6b1a5a1d9d52e109d38680853c58b11 (patch) | |
tree | 807c0173869a653c6356082ea424fbf803730817 | |
parent | fb43a1cc3d40b540411f9565e848d32598cf4b3f (diff) | |
download | vyos-cloud-init-45bff1e1c6b1a5a1d9d52e109d38680853c58b11.tar.gz vyos-cloud-init-45bff1e1c6b1a5a1d9d52e109d38680853c58b11.zip |
DataSourceConfigDrive: change 'interfaces' to 'network-interfaces'
Instead of a metadata entry named 'interfaces', use 'network-interfaces'
which is a somewhat less likely namespace collision.
-rw-r--r-- | cloudinit/DataSourceConfigDrive.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/DataSourceConfigDrive.py b/cloudinit/DataSourceConfigDrive.py index 04b9e0ce..af776e08 100644 --- a/cloudinit/DataSourceConfigDrive.py +++ b/cloudinit/DataSourceConfigDrive.py @@ -78,7 +78,7 @@ class DataSourceConfigDrive(DataSource.DataSource): else: log.debug("updating network interfaces from configdrive") - util.write_file("/etc/network/interfaces", md['interfaces']) + util.write_file("/etc/network/interfaces", md['network-interfaces']) try: (out, err) = util.subp(['ifup', '--all']) if len(out) or len(err): @@ -165,7 +165,7 @@ def read_config_drive_dir(source_dir): if "etc/network/interfaces" in found: with open("%s/%s" % (source_dir, "/etc/network/interfaces")) as fp: - md['interfaces'] = fp.read() + md['network-interfaces'] = fp.read() if "root/.ssh/authorized_keys" in found: with open("%s/%s" % (source_dir, "root/.ssh/authorized_keys")) as fp: |