summaryrefslogtreecommitdiff
path: root/cloudinit/distros/debian.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-03-22 05:40:05 -0400
committerScott Moser <smoser@ubuntu.com>2016-03-22 05:40:05 -0400
commit7f0871dc5b141ff4bf601b6d96021eba8a3bb0ec (patch)
treeaafd702015714ab95b5eb681d18053fe5b628fd5 /cloudinit/distros/debian.py
parent4445b881380a39a56490d8a8f9e07bba4540ec62 (diff)
downloadvyos-cloud-init-7f0871dc5b141ff4bf601b6d96021eba8a3bb0ec.tar.gz
vyos-cloud-init-7f0871dc5b141ff4bf601b6d96021eba8a3bb0ec.zip
write to 50-cloud-init.cfg and write systemd.link rules.
Diffstat (limited to 'cloudinit/distros/debian.py')
-rw-r--r--cloudinit/distros/debian.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/cloudinit/distros/debian.py b/cloudinit/distros/debian.py
index 909d6deb..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,7 +80,10 @@ class Distro(distros.Distro):
def _write_network_config(self, netconfig):
ns = net.parse_net_config_data(netconfig)
- 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):