Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples/guided.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-05-22 20:40:20 +0200
committerAnton Hvornum <anton@hvornum.se>2021-05-22 20:40:20 +0200
commitd7e23c847f4901b039b5a78c92e63ffa20b31268 (patch)
treedd40b4c40fb9ab9b87f3a9ae2f5e7712b12f1af6 /examples/guided.py
parent35974e662459066db6e2ad8538bb83a7dee56028 (diff)
Added in the option to select system locale if --advance is given to guided, as it does potentially cause issues in the installation if not configured properly
Diffstat (limited to 'examples/guided.py')
-rw-r--r--examples/guided.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/guided.py b/examples/guided.py
index e60cd0f8..122f0804 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -51,6 +51,17 @@ def ask_user_questions():
selected_region = archinstall.arguments['mirror-region']
archinstall.arguments['mirror-region'] = {selected_region: archinstall.list_mirrors()[selected_region]}
+ if not archinstall.arguments.get('sys-language', None) and archinstall.arguments.get('advanced', False):
+ archinstall.arguments['sys-language'] = input("Enter a valid locale (language) for your OS, (Default: en_US): ").strip()
+ archinstall.arguments['sys-encoding'] = input("Enter a valid system default encoding for your OS, (Default: utf-8): ").strip()
+
+ if not archinstall.arguments['sys-language']:
+ archinstall.arguments['sys-language'] = 'en_US'
+ if not archinstall.arguments['sys-encoding']:
+ archinstall.arguments['sys-encoding'] = 'utf-8'
+
+ archinstall.log("Keep in mind that if you want multiple locales, post configuration is required.", fg="yellow")
+
# Ask which harddrive/block-device we will install to
if archinstall.arguments.get('harddrive', None):
archinstall.arguments['harddrive'] = archinstall.BlockDevice(archinstall.arguments['harddrive'])
@@ -328,6 +339,7 @@ def perform_installation(mountpoint):
if archinstall.arguments.get('mirror-region', None):
archinstall.use_mirrors(archinstall.arguments['mirror-region']) # Set the mirrors for the live medium
if installation.minimal_installation():
+ installation.set_locale(archinstall.arguments['sys-language'], archinstall.arguments['sys-encoding'].upper())
installation.set_hostname(archinstall.arguments['hostname'])
if archinstall.arguments['mirror-region'].get("mirrors", None) is not None:
installation.set_mirrors(archinstall.arguments['mirror-region']) # Set the mirrors in the installation medium