Skip to content

Commit

Permalink
Fix hostname None (#2893)
Browse files Browse the repository at this point in the history
  • Loading branch information
codefiles authored Nov 20, 2024
1 parent f827851 commit 3453816
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions archinstall/lib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ def minimal_installation(
testing: bool = False,
multilib: bool = False,
mkinitcpio: bool = True,
hostname: str = 'archinstall',
hostname: str | None = None,
locale_config: LocaleConfiguration = LocaleConfiguration.default()
):
if self._disk_config.lvm_config:
Expand Down Expand Up @@ -874,7 +874,9 @@ def minimal_installation(
# os.remove(f'{self.target}/etc/localtime')
# sys_command(f'/usr/bin/arch-chroot {self.target} ln -s /usr/share/zoneinfo/{localtime} /etc/localtime')
# sys_command('/usr/bin/arch-chroot /mnt hwclock --hctosys --localtime')
self.set_hostname(hostname)
if hostname:
self.set_hostname(hostname)

self.set_locale(locale_config)
self.set_keyboard_language(locale_config.kb_layout)

Expand Down
2 changes: 1 addition & 1 deletion archinstall/scripts/guided.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def perform_installation(mountpoint: Path) -> None:
testing=enable_testing,
multilib=enable_multilib,
mkinitcpio=run_mkinitcpio,
hostname=archinstall.arguments.get('hostname', 'archlinux'),
hostname=archinstall.arguments.get('hostname'),
locale_config=locale_config
)

Expand Down

0 comments on commit 3453816

Please sign in to comment.