diff options
author | Joshua Powers <josh.powers@canonical.com> | 2017-07-21 11:56:50 -0700 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-07-24 15:59:41 -0400 |
commit | 85c984c3c74b0a8751698e20915b89756580b09f (patch) | |
tree | ecb0fd88d1f019632ded07aa0decb60bcc35db72 /cloudinit/distros/arch.py | |
parent | 681baff19dc16ef2efdfb8499ad74aea0efbe467 (diff) | |
download | vyos-cloud-init-85c984c3c74b0a8751698e20915b89756580b09f.tar.gz vyos-cloud-init-85c984c3c74b0a8751698e20915b89756580b09f.zip |
archlinux: fix set hostname usage of write_file.
cloud-init fails to set the hostname on Arch Linux because that
_write_hostname passes conf instead of str(conf) to util.write_file.
LP: #1705306
Diffstat (limited to 'cloudinit/distros/arch.py')
-rw-r--r-- | cloudinit/distros/arch.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/distros/arch.py b/cloudinit/distros/arch.py index 75d46201..b4c0ba72 100644 --- a/cloudinit/distros/arch.py +++ b/cloudinit/distros/arch.py @@ -119,7 +119,7 @@ class Distro(distros.Distro): if not conf: conf = HostnameConf('') conf.set_hostname(your_hostname) - util.write_file(out_fn, conf, 0o644) + util.write_file(out_fn, str(conf), omode="w", mode=0o644) def _read_system_hostname(self): sys_hostname = self._read_hostname(self.hostname_conf_fn) |