Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-05-22 20:14:09 +0200
committerGitHub <noreply@github.com>2021-05-22 20:14:09 +0200
commit35974e662459066db6e2ad8538bb83a7dee56028 (patch)
tree07b28e2f59716f2bbabee6f7d8c052043bbaebae
parent93bc0ebd0ff74fc72d9336ff614ec3c6731faa47 (diff)
parentd0a37843aa2bf71f1d8eaa6cbd590aaa1a35e0bf (diff)
Merge pull request #505 from archlinux/torxed-fix-297
Introduces a NTP option in guided
-rw-r--r--examples/guided.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/guided.py b/examples/guided.py
index c5440efe..e60cd0f8 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -237,6 +237,12 @@ 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_installation_steps():
print()
@@ -369,6 +375,9 @@ def perform_installation(mountpoint):
if timezone := archinstall.arguments.get('timezone', None):
installation.set_timezone(timezone)
+ if archinstall.arguments.get('ntp', False):
+ installation.activate_ntp()
+
if (root_pw := archinstall.arguments.get('!root-password', None)) and len(root_pw):
installation.user_set_pw('root', root_pw)