diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-09-19 15:07:03 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-09-19 15:07:03 -0400 |
commit | b2be60ef19ffa95546dd64ea91913c8fe0096719 (patch) | |
tree | 0f69aa05a34085b10336b9dd1dfc8d6b2583e38d /cloudinit/distros/debian.py | |
parent | 91f1fc58e134fea2ac3ff04301bb0ea51f8797b1 (diff) | |
download | vyos-cloud-init-b2be60ef19ffa95546dd64ea91913c8fe0096719.tar.gz vyos-cloud-init-b2be60ef19ffa95546dd64ea91913c8fe0096719.zip |
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
Diffstat (limited to 'cloudinit/distros/debian.py')
-rw-r--r-- | cloudinit/distros/debian.py | 3 |
1 files changed, 1 insertions, 2 deletions
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) |