summaryrefslogtreecommitdiff
path: root/cloudinit/distros/debian.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-03-23 11:00:37 -0400
committerScott Moser <smoser@ubuntu.com>2016-03-23 11:00:37 -0400
commitd32116c3468e5c394b56d078ceef86d416d83b3a (patch)
tree6c92d8bc5edfd9726106946bd57e9c8acc26f86a /cloudinit/distros/debian.py
parent6082a5b0c2b1a52ddbf63bfd80331f28f8cdc4fa (diff)
parent5b3cad36be8981cd12cffdf5c5e539b522404000 (diff)
downloadvyos-cloud-init-d32116c3468e5c394b56d078ceef86d416d83b3a.tar.gz
vyos-cloud-init-d32116c3468e5c394b56d078ceef86d416d83b3a.zip
merge from trunk.net1
Diffstat (limited to 'cloudinit/distros/debian.py')
-rw-r--r--cloudinit/distros/debian.py9
1 files changed, 6 insertions, 3 deletions
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):