def set_hostname(self, rootdir):
hostname = self.settings['hostname']
with open(os.path.join(rootdir, 'etc', 'hostname'), 'w') as f:
- f.write(hostname)
+ f.write('%s\n' % hostname)
def set_root_password(self, rootdir):
if self.settings['root-password']: