From 48016ceed0840305bb57804ecaa1a6c2fbd455a7 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Fri, 21 Dec 2012 12:46:14 +0100 Subject: Add resolv.conf configuration function --- cloudinit/distros/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) 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) -- cgit v1.2.3