index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | archinstall/lib/installer.py | 12 |
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 47a26d6d..8f32dd33 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -257,9 +257,15 @@ class Installer: def activate_ntp(self): self.log('Installing and activating NTP.', level=logging.INFO) - if self.pacstrap('ntp'): - if self.enable_service('ntpd'): - return True + self.enable_service('systemd-timesyncd') + + with open(f"{self.target}/etc/systemd/timesyncd.conf", "w") as fh: + fh.write("[Time]\n") + fh.write("NTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org\n") + fh.write("FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 0.fr.pool.ntp.org\n") + + with Boot(self) as session: + session.SysCommand(["timedatectl", "set-ntp", 'true']) def enable_service(self, *services): for service in services: |