Revert "Locale timezone python chmod (#4210)"
This reverts commit 01d3af9fbb.
This commit is contained in:
parent
01d3af9fbb
commit
979f953822
|
|
@ -891,7 +891,6 @@ class Installer:
|
||||||
mkinitcpio: bool = True,
|
mkinitcpio: bool = True,
|
||||||
hostname: str | None = None,
|
hostname: str | None = None,
|
||||||
locale_config: LocaleConfiguration | None = LocaleConfiguration.default(),
|
locale_config: LocaleConfiguration | None = LocaleConfiguration.default(),
|
||||||
timezone: str | None = None,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
if self._disk_config.lvm_config:
|
if self._disk_config.lvm_config:
|
||||||
lvm = 'lvm2'
|
lvm = 'lvm2'
|
||||||
|
|
@ -948,6 +947,10 @@ class Installer:
|
||||||
if not self._disable_fstrim:
|
if not self._disable_fstrim:
|
||||||
self.enable_periodic_trim()
|
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:
|
if hostname:
|
||||||
self.set_hostname(hostname)
|
self.set_hostname(hostname)
|
||||||
|
|
||||||
|
|
@ -955,15 +958,8 @@ class Installer:
|
||||||
self.set_locale(locale_config)
|
self.set_locale(locale_config)
|
||||||
self.set_keyboard_language(locale_config.kb_layout)
|
self.set_keyboard_language(locale_config.kb_layout)
|
||||||
|
|
||||||
if timezone:
|
# TODO: Use python functions for this
|
||||||
if not self.set_timezone(timezone):
|
self.arch_chroot('chmod 700 /root')
|
||||||
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')
|
|
||||||
|
|
||||||
if mkinitcpio and not self.mkinitcpio(['-P']):
|
if mkinitcpio and not self.mkinitcpio(['-P']):
|
||||||
error('Error generating initramfs (continuing anyway)')
|
error('Error generating initramfs (continuing anyway)')
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,6 @@ def perform_installation(
|
||||||
mkinitcpio=run_mkinitcpio,
|
mkinitcpio=run_mkinitcpio,
|
||||||
hostname=arch_config_handler.config.hostname,
|
hostname=arch_config_handler.config.hostname,
|
||||||
locale_config=locale_config,
|
locale_config=locale_config,
|
||||||
timezone=config.timezone,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if mirror_config := config.mirror_config:
|
if mirror_config := config.mirror_config:
|
||||||
|
|
@ -140,6 +139,9 @@ def perform_installation(
|
||||||
if config.packages and config.packages[0] != '':
|
if config.packages and config.packages[0] != '':
|
||||||
installation.add_additional_packages(config.packages)
|
installation.add_additional_packages(config.packages)
|
||||||
|
|
||||||
|
if timezone := config.timezone:
|
||||||
|
installation.set_timezone(timezone)
|
||||||
|
|
||||||
if config.ntp:
|
if config.ntp:
|
||||||
installation.activate_time_synchronization()
|
installation.activate_time_synchronization()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue