summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavi Fontan <jfontan@opennebula.org>2012-12-21 12:46:14 +0100
committerJavi Fontan <jfontan@opennebula.org>2012-12-21 12:46:14 +0100
commit48016ceed0840305bb57804ecaa1a6c2fbd455a7 (patch)
tree1a537ff38630ebf24e983e21796d9cf82244e209
parent2efdb4b8d1c17eea352ae0dc022d2ddca80833da (diff)
downloadvyos-cloud-init-48016ceed0840305bb57804ecaa1a6c2fbd455a7.tar.gz
vyos-cloud-init-48016ceed0840305bb57804ecaa1a6c2fbd455a7.zip
Add resolv.conf configuration function
-rw-r--r--cloudinit/distros/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py
index 6a684b89..ae81be50 100644
--- a/cloudinit/distros/__init__.py
+++ b/cloudinit/distros/__init__.py
@@ -59,6 +59,10 @@ class Distro(object):
# to write this blob out in a distro format
raise NotImplementedError()
+ def apply_resolv_conf(self, settings):
+ net_fn = self._paths.join(False, "/etc/resolv.conf")
+ util.write_file(net_fn, settings)
+
def get_option(self, opt_name, default=None):
return self._cfg.get(opt_name, default)