Refactor set_hostname() (#3009)
This commit is contained in:
parent
3400991c9b
commit
8f2bf2b737
|
|
@ -526,8 +526,7 @@ class Installer:
|
||||||
fp.write(f'{entry}\n')
|
fp.write(f'{entry}\n')
|
||||||
|
|
||||||
def set_hostname(self, hostname: str) -> None:
|
def set_hostname(self, hostname: str) -> None:
|
||||||
with open(f'{self.target}/etc/hostname', 'w') as fh:
|
(self.target / 'etc/hostname').write_text(hostname + '\n')
|
||||||
fh.write(hostname + '\n')
|
|
||||||
|
|
||||||
def set_locale(self, locale_config: LocaleConfiguration) -> bool:
|
def set_locale(self, locale_config: LocaleConfiguration) -> bool:
|
||||||
modifier = ''
|
modifier = ''
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue