diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-03-23 11:00:37 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-03-23 11:00:37 -0400 |
commit | d32116c3468e5c394b56d078ceef86d416d83b3a (patch) | |
tree | 6c92d8bc5edfd9726106946bd57e9c8acc26f86a /cloudinit/distros | |
parent | 6082a5b0c2b1a52ddbf63bfd80331f28f8cdc4fa (diff) | |
parent | 5b3cad36be8981cd12cffdf5c5e539b522404000 (diff) | |
download | vyos-cloud-init-d32116c3468e5c394b56d078ceef86d416d83b3a.tar.gz vyos-cloud-init-d32116c3468e5c394b56d078ceef86d416d83b3a.zip |
merge from trunk.net1
Diffstat (limited to 'cloudinit/distros')
-rw-r--r-- | cloudinit/distros/__init__.py | 2 | ||||
-rw-r--r-- | cloudinit/distros/debian.py | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py index 74b484a7..418421b9 100644 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -135,7 +135,7 @@ class Distro(object): return self._bring_up_interfaces(dev_names) return False - def apply_network_config(self, netconfig, bring_up=True): + def apply_network_config(self, netconfig, bring_up=False): # Write it out dev_names = self._write_network_config(netconfig) # Now try to bring them up diff --git a/cloudinit/distros/debian.py b/cloudinit/distros/debian.py index c7a4ba07..b14fa3e2 100644 --- a/cloudinit/distros/debian.py +++ b/cloudinit/distros/debian.py @@ -46,7 +46,8 @@ APT_GET_WRAPPER = { class Distro(distros.Distro): hostname_conf_fn = "/etc/hostname" locale_conf_fn = "/etc/default/locale" - network_conf_fn = "/etc/network/interfaces" + network_conf_fn = "/etc/network/interfaces.d/50-cloud-init.cfg" + links_prefix = "/etc/systemd/network/50-cloud-init-" def __init__(self, name, cfg, paths): distros.Distro.__init__(self, name, cfg, paths) @@ -79,8 +80,10 @@ class Distro(distros.Distro): def _write_network_config(self, netconfig): ns = net.parse_net_config_data(netconfig) - ns = net.merge_from_cmdline_config(ns) - net.render_network_state(network_state=ns, target="/") + net.render_network_state(target="/", network_state=ns, + eni=self.network_conf_fn, + links_prefix=self.links_prefix) + util.del_file("/etc/network/interfaces.d/eth0.cfg") return [] def _bring_up_interfaces(self, device_names): |