index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds+github@gmail.com> | 2020-08-18 21:56:22 +0000 |
---|---|---|
committer | Anton Hvornum <anton.feeds+github@gmail.com> | 2020-08-18 21:56:22 +0000 |
commit | af875e3902904e80557cf3ecb351ff5e3a80f461 (patch) | |
tree | 75fa1d775b15d6563a94097444f470f7c75151f9 /archinstall/lib/installer.py | |
parent | 76c386951a802abd814f88aa9d67109275244a5c (diff) | |
parent | 1d8591c7fe2a9c4d2a6338cc332e7704751acbe7 (diff) |
-rw-r--r-- | archinstall/lib/installer.py | 14 |
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 3310c335..a6fafb03 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -79,9 +79,9 @@ class Installer(): if not len(locale): return True with open(f'{self.mountpoint}/etc/locale.gen', 'a') as fh: - fh.write(f'{locale} {encoding}\n') + fh.write(f'{locale}.{encoding} {encoding}\n') with open(f'{self.mountpoint}/etc/locale.conf', 'w') as fh: - fh.write(f'LANG={locale}\n') + fh.write(f'LANG={locale}.{encoding}\n') return True if sys_command(f'/usr/bin/arch-chroot {self.mountpoint} locale-gen').exit_code == 0 else False @@ -91,6 +91,16 @@ class Installer(): o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.mountpoint} ln -s /usr/share/zoneinfo/{zone} /etc/localtime')) return True + def activate_ntp(self): + log(f'Adding bootloader to {self.boot_partition}') + if self.pacstrap('ntp'): + if self.enable_service('ntpd'): + return True + + def enable_service(self, service): + log(f'Enabling service {service}') + return self.arch_chroot(f'systemctl enable {service}').exit_code == 0 + def run_command(self, cmd, *args, **kwargs): return sys_command(f'/usr/bin/arch-chroot {self.mountpoint} {cmd}') |