* Added a --skip-ntp parameter to deal with #2144 * Made info/warn strings translateable * Corrected spelling mistake
This commit is contained in:
parent
e28ba95370
commit
2437e901d9
|
|
@ -77,6 +77,7 @@ def define_arguments():
|
||||||
parser.add_argument("-v", "--version", action="version", version="%(prog)s " + __version__)
|
parser.add_argument("-v", "--version", action="version", version="%(prog)s " + __version__)
|
||||||
parser.add_argument("--config", nargs="?", help="JSON configuration file or URL")
|
parser.add_argument("--config", nargs="?", help="JSON configuration file or URL")
|
||||||
parser.add_argument("--creds", nargs="?", help="JSON credentials configuration file")
|
parser.add_argument("--creds", nargs="?", help="JSON credentials configuration file")
|
||||||
|
parser.add_argument("--skip-ntp", nargs="?", help="Disables NTP checks during instalation")
|
||||||
parser.add_argument("--silent", action="store_true",
|
parser.add_argument("--silent", action="store_true",
|
||||||
help="WARNING: Disables all prompts for input and confirmation. If no configuration is provided, this is ignored")
|
help="WARNING: Disables all prompts for input and confirmation. If no configuration is provided, this is ignored")
|
||||||
parser.add_argument("--dry-run", "--dry_run", action="store_true",
|
parser.add_argument("--dry-run", "--dry_run", action="store_true",
|
||||||
|
|
|
||||||
|
|
@ -130,13 +130,23 @@ class Installer:
|
||||||
One such service is "reflector.service" which updates /etc/pacman.d/mirrorlist
|
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.
|
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:
|
if not storage['arguments'].get('skip_ntp', False):
|
||||||
time_val = SysCommand('timedatectl show --property=NTPSynchronized --value').decode()
|
info(_('Waiting for time sync (timedatectl show) to complete.'))
|
||||||
if time_val and time_val.strip() == 'yes':
|
|
||||||
break
|
_started_wait = time.time()
|
||||||
time.sleep(1)
|
_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.')
|
info('Waiting for automatic mirror selection (reflector) to complete.')
|
||||||
while self._service_state('reflector') not in ('dead', 'failed', 'exited'):
|
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'):
|
# while self._service_state('pacman-init') not in ('dead', 'failed', 'exited'):
|
||||||
# time.sleep(1)
|
# 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
|
# Wait for the timer to kick in
|
||||||
while self._service_started('archlinux-keyring-wkd-sync.timer') is None:
|
while self._service_started('archlinux-keyring-wkd-sync.timer') is None:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue