Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/installer.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2023-11-22 22:52:21 +0100
committerGitHub <noreply@github.com>2023-11-22 22:52:21 +0100
commit2437e901d90a277f35e9f8a927960b6789d18eb8 (patch)
tree58dd9b8e7c6b2f4c277ba09045281a0051bb88ae /archinstall/lib/installer.py
parente28ba953708cee089161a795fb3191cfd5c3d93a (diff)
Added a --skip-ntp parameter to deal with #2144 (#2225)
* Added a --skip-ntp parameter to deal with #2144 * Made info/warn strings translateable * Corrected spelling mistake
Diffstat (limited to 'archinstall/lib/installer.py')
-rw-r--r--archinstall/lib/installer.py24
1 files changed, 17 insertions, 7 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index e2ca5e2b..4668fdfc 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -130,13 +130,23 @@ class Installer:
One such service is "reflector.service" which updates /etc/pacman.d/mirrorlist
We need to wait for it before we continue since we opted in to use a custom mirror/region.
"""
- info('Waiting for time sync (systemd-timesyncd.service) to complete.')
- while True:
- time_val = SysCommand('timedatectl show --property=NTPSynchronized --value').decode()
- if time_val and time_val.strip() == 'yes':
- break
- time.sleep(1)
+ if not storage['arguments'].get('skip_ntp', False):
+ info(_('Waiting for time sync (timedatectl show) to complete.'))
+
+ _started_wait = time.time()
+ _notified = False
+ while True:
+ if not _notified and time.time() - _started_wait > 5:
+ _notified = True
+ warn(_("Time syncronization not completing, while you wait - check the docs for workarounds: https://archinstall.readthedocs.io/"))
+
+ time_val = SysCommand('timedatectl show --property=NTPSynchronized --value').decode()
+ if time_val and time_val.strip() == 'yes':
+ break
+ time.sleep(1)
+ else:
+ info(_('Skipping waiting for automatic time sync (this can cause issues if time is out of sync during installation)'))
info('Waiting for automatic mirror selection (reflector) to complete.')
while self._service_state('reflector') not in ('dead', 'failed', 'exited'):
@@ -146,7 +156,7 @@ class Installer:
# while self._service_state('pacman-init') not in ('dead', 'failed', 'exited'):
# time.sleep(1)
- info('Waiting for Arch Linux keyring sync (archlinux-keyring-wkd-sync) to complete.')
+ info(_('Waiting for Arch Linux keyring sync (archlinux-keyring-wkd-sync) to complete.'))
# Wait for the timer to kick in
while self._service_started('archlinux-keyring-wkd-sync.timer') is None:
time.sleep(1)