From b2be60ef19ffa95546dd64ea91913c8fe0096719 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 19 Sep 2012 15:07:03 -0400 Subject: do not write a comment in /etc/hostname. Network Manager (LP: #1053048), and apparently fedora/redhat do not like comments in this file. LP: #1052664 --- cloudinit/distros/debian.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cloudinit/distros/debian.py') diff --git a/cloudinit/distros/debian.py b/cloudinit/distros/debian.py index da27f780..5b4aa9f8 100644 --- a/cloudinit/distros/debian.py +++ b/cloudinit/distros/debian.py @@ -67,8 +67,7 @@ class Distro(distros.Distro): def _write_hostname(self, hostname, out_fn): # "" gives trailing newline. - lines = ["# Created by cloud-init", str(hostname), ""] - util.write_file(out_fn, '\n'.join(lines), 0644) + util.write_file(out_fn, "%s\n" % str(hostname), 0644) def update_hostname(self, hostname, prev_fn): hostname_prev = self._read_hostname(prev_fn) -- cgit v1.2.3