summaryrefslogtreecommitdiff
path: root/cloudinit/distros/rhel.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/distros/rhel.py')
-rw-r--r--cloudinit/distros/rhel.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/cloudinit/distros/rhel.py b/cloudinit/distros/rhel.py
index be5b3d24..c9ee2747 100644
--- a/cloudinit/distros/rhel.py
+++ b/cloudinit/distros/rhel.py
@@ -78,18 +78,18 @@ class Distro(distros.Distro):
}
rhel_util.update_sysconfig_file(out_fn, locale_cfg)
- def _write_hostname(self, hostname, out_fn):
+ def _write_hostname(self, hostname, filename):
# systemd will never update previous-hostname for us, so
# we need to do it ourselves
- if self.uses_systemd() and out_fn.endswith('/previous-hostname'):
- util.write_file(out_fn, hostname)
+ if self.uses_systemd() and filename.endswith('/previous-hostname'):
+ util.write_file(filename, hostname)
elif self.uses_systemd():
subp.subp(['hostnamectl', 'set-hostname', str(hostname)])
else:
host_cfg = {
'HOSTNAME': hostname,
}
- rhel_util.update_sysconfig_file(out_fn, host_cfg)
+ rhel_util.update_sysconfig_file(filename, host_cfg)
def _read_system_hostname(self):
if self.uses_systemd():