Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-05-22 20:04:55 +0200
committerAnton Hvornum <anton@hvornum.se>2021-05-22 20:04:55 +0200
commitb45efe0983387b1b00b8ac956bec3fdd1a97d9f0 (patch)
treea8558aaa5141c65472a5e07b7219a27484a7aa54 /examples
parent93bc0ebd0ff74fc72d9336ff614ec3c6731faa47 (diff)
Adding a NTP option to syncronize time.
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/guided.py b/examples/guided.py
index c5440efe..a2790af3 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -237,6 +237,9 @@ def ask_user_questions():
if not archinstall.arguments.get('timezone', None):
archinstall.arguments['timezone'] = archinstall.ask_for_a_timezone()
+ if not archinstall.arguments.get('ntp', False):
+ archinstall.arguments['ntp'] = input("Would you like to use automatic time syncronization (ntp) with default time servers? N/y: ").strip().lower() in ('y', 'yes')
+
def perform_installation_steps():
print()
@@ -369,6 +372,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)