This reverts commit 01d3af9fbb.
This commit is contained in:
parent
01d3af9fbb
commit
c92a457142
|
|
@ -891,7 +891,6 @@ class Installer:
|
|||
mkinitcpio: bool = True,
|
||||
hostname: str | None = None,
|
||||
locale_config: LocaleConfiguration | None = LocaleConfiguration.default(),
|
||||
timezone: str | None = None,
|
||||
) -> None:
|
||||
if self._disk_config.lvm_config:
|
||||
lvm = 'lvm2'
|
||||
|
|
@ -948,6 +947,10 @@ class Installer:
|
|||
if not self._disable_fstrim:
|
||||
self.enable_periodic_trim()
|
||||
|
||||
# TODO: Support locale and timezone
|
||||
# os.remove(f'{self.target}/etc/localtime')
|
||||
# sys_command(f'arch-chroot {self.target} ln -s /usr/share/zoneinfo/{localtime} /etc/localtime')
|
||||
# sys_command('arch-chroot /mnt hwclock --hctosys --localtime')
|
||||
if hostname:
|
||||
self.set_hostname(hostname)
|
||||
|
||||
|
|
@ -955,15 +958,8 @@ class Installer:
|
|||
self.set_locale(locale_config)
|
||||
self.set_keyboard_language(locale_config.kb_layout)
|
||||
|
||||
if timezone:
|
||||
if not self.set_timezone(timezone):
|
||||
warn(f'Failed to set timezone: {timezone}')
|
||||
|
||||
root_dir = self.target / 'root'
|
||||
if root_dir.exists():
|
||||
root_dir.chmod(0o700)
|
||||
else:
|
||||
debug(f'Root directory not found at {root_dir}, skipping chmod')
|
||||
# TODO: Use python functions for this
|
||||
self.arch_chroot('chmod 700 /root')
|
||||
|
||||
if mkinitcpio and not self.mkinitcpio(['-P']):
|
||||
error('Error generating initramfs (continuing anyway)')
|
||||
|
|
|
|||
|
|
@ -102,7 +102,6 @@ def perform_installation(
|
|||
mkinitcpio=run_mkinitcpio,
|
||||
hostname=arch_config_handler.config.hostname,
|
||||
locale_config=locale_config,
|
||||
timezone=config.timezone,
|
||||
)
|
||||
|
||||
if mirror_config := config.mirror_config:
|
||||
|
|
@ -140,6 +139,9 @@ def perform_installation(
|
|||
if config.packages and config.packages[0] != '':
|
||||
installation.add_additional_packages(config.packages)
|
||||
|
||||
if timezone := config.timezone:
|
||||
installation.set_timezone(timezone)
|
||||
|
||||
if config.ntp:
|
||||
installation.activate_time_synchronization()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue