Adding back 'timedatectl set-ntp true' but with the condition of it being activated. This is because the default NTP value is set to True. And will subsequently never be triggered through the menu system. So we'll have to activate it (again) if set to True before installer starts.

This commit is contained in:
Anton Hvornum 2022-04-26 15:13:29 +02:00
parent 010f6eaf97
commit eafbf49cdc
No known key found for this signature in database
GPG Key ID: F1234C5BA67C59DF
1 changed files with 6 additions and 3 deletions

View File

@ -151,10 +151,13 @@ def perform_installation(mountpoint):
while archinstall.service_state('reflector') not in ('dead', 'failed'):
time.sleep(1)
# If we've activated NTP, make sure at least one time-sync finishes
# before we continue with the installation
# If we've activated NTP, make sure it's active in the ISO too and
# make sure at least one time-sync finishes before we continue with the installation
if archinstall.arguments.get('ntp', False):
# TODO: First block might be redundant, but this service is not activated unless
# Activate NTP in the ISO
archinstall.SysCommand('timedatectl set-ntp true')
# TODO: This block might be redundant, but this service is not activated unless
# `timedatectl set-ntp true` is executed.
logged = False
while archinstall.service_state('dbus-org.freedesktop.timesync1.service') not in ('running'):