Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlario Gelmetti <iochesonome@gmail.com>2022-01-02 22:45:44 +0100
committerGitHub <noreply@github.com>2022-01-02 22:45:44 +0100
commit3474176e641eed9ced37c918b157fd35c07dc388 (patch)
tree532c27e0c1ce63b2997bf92232acd8c61f1daa75
parent240f688ccefa7bddb56efe5bc41a457c96792e42 (diff)
examples/guided: if selected, activate NTP also in installer system (#831)
* Ask for NTP even if timezone is unset * Ask for NTP before retrieving mirror list * Activate NTP in the installer as soon as asked * Removed excessive import SysCommand is exposed through archinstall * Removed f-string Co-authored-by: Anton Hvornum <anton.feeds+github@gmail.com>
-rw-r--r--examples/guided.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 57409644..0760baf1 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -65,6 +65,12 @@ def ask_user_questions():
if len(archinstall.arguments['keyboard-layout']):
archinstall.set_keyboard_language(archinstall.arguments['keyboard-layout'])
+ if not archinstall.arguments.get('ntp', False):
+ archinstall.arguments['ntp'] = input("Would you like to use automatic time synchronization (NTP) with the default time servers? [Y/n]: ").strip().lower() in ('y', 'yes', '')
+ if archinstall.arguments['ntp']:
+ archinstall.log("Hardware time and other post-configuration steps might be required in order for NTP to work. For more information, please check the Arch wiki.", fg="yellow")
+ archinstall.SysCommand('timedatectl set-ntp true')
+
# Set which region to download packages from during the installation
if not archinstall.arguments.get('mirror-region', None):
archinstall.arguments['mirror-region'] = archinstall.select_mirror_regions()
@@ -179,12 +185,6 @@ def ask_user_questions():
if not archinstall.arguments.get('timezone', None):
archinstall.arguments['timezone'] = archinstall.ask_for_a_timezone()
- if archinstall.arguments['timezone']:
- if not archinstall.arguments.get('ntp', False):
- archinstall.arguments['ntp'] = input("Would you like to use automatic time synchronization (NTP) with the default time servers? [Y/n]: ").strip().lower() in ('y', 'yes', '')
- if archinstall.arguments['ntp']:
- archinstall.log("Hardware time and other post-configuration steps might be required in order for NTP to work. For more information, please check the Arch wiki.", fg="yellow")
-
def perform_filesystem_operations():
print()