diff options
author | Javi Fontan <jfontan@opennebula.org> | 2012-12-21 12:46:14 +0100 |
---|---|---|
committer | Javi Fontan <jfontan@opennebula.org> | 2012-12-21 12:46:14 +0100 |
commit | 48016ceed0840305bb57804ecaa1a6c2fbd455a7 (patch) | |
tree | 1a537ff38630ebf24e983e21796d9cf82244e209 | |
parent | 2efdb4b8d1c17eea352ae0dc022d2ddca80833da (diff) | |
download | vyos-cloud-init-48016ceed0840305bb57804ecaa1a6c2fbd455a7.tar.gz vyos-cloud-init-48016ceed0840305bb57804ecaa1a6c2fbd455a7.zip |
Add resolv.conf configuration function
-rw-r--r-- | cloudinit/distros/__init__.py | 4 |
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) |