diff options
Diffstat (limited to 'cloudinit/distros')
-rw-r--r-- | cloudinit/distros/__init__.py | 6 | ||||
-rw-r--r-- | cloudinit/distros/ubuntu.py | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py index e0ef6ee0..6325257c 100644 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -133,14 +133,14 @@ class Distro(object): raise NotImplementedError("Unknown interface action %s" % (action)) cmd = IFACE_ACTIONS[action] try: - LOG.info("Attempting to run %s interface action using command %s", - action, cmd) + LOG.debug("Attempting to run %s interface action using command %s", + action, cmd) (_out, err) = util.subp(cmd) if len(err): LOG.warn("Running %s resulted in stderr output: %s", cmd, err) return True except util.ProcessExecutionError: - util.logexc(LOG, "Running %s failed", cmd) + util.logexc(LOG, "Running interface command %s failed", cmd) return False diff --git a/cloudinit/distros/ubuntu.py b/cloudinit/distros/ubuntu.py index fd7b7b8d..15af2e7f 100644 --- a/cloudinit/distros/ubuntu.py +++ b/cloudinit/distros/ubuntu.py @@ -112,7 +112,11 @@ class Distro(distros.Distro): if not os.path.isfile(tz_file): raise Exception(("Invalid timezone %s," " no file found at %s") % (tz, tz_file)) - tz_contents = "%s\n" % tz + tz_lines = [ + "# Created by cloud-init", + str(tz), + ] + tz_contents = "\n".join(tz_lines) tz_fn = self._paths.join(False, "/etc/timezone") util.write_file(tz_fn, tz_contents) util.copy(tz_file, self._paths.join(False, "/etc/localtime")) |