summaryrefslogtreecommitdiff
path: root/archsetup
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-01-21 17:39:49 -0600
committerCraig Jennings <c@cjennings.net>2026-01-21 17:39:49 -0600
commitfbc9f4ae8e8f70a955359121e0852c83bd8b7b36 (patch)
tree4742e62befe86fb357641882fcb8d347cb6d3575 /archsetup
parentfd7339f271990651ae6e13e14473b1d9f2b5d65c (diff)
fix(archsetup): add locale configuration
Configure en_US.UTF-8 locale early in Environment Configuration section to prevent "cannot change locale" errors during package installs.
Diffstat (limited to 'archsetup')
-rwxr-xr-xarchsetup7
1 files changed, 7 insertions, 0 deletions
diff --git a/archsetup b/archsetup
index e598b9f..177afcc 100755
--- a/archsetup
+++ b/archsetup
@@ -523,6 +523,13 @@ prerequisites() {
display "subtitle" "Environment Configuration"
+ # configure locale (must happen before package installs that depend on locale)
+ action="configuring locale" && display "task" "$action"
+ sed -i 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
+ (locale-gen >> "$logfile" 2>&1) || error "error" "$action" "$?"
+ echo "LANG=en_US.UTF-8" > /etc/locale.conf
+ export LANG=en_US.UTF-8
+
# sync the time on this machine (one-shot chrony sync)
action="synchronizing system time" && display "task" "$action"
(chronyd -q 'server 0.us.pool.ntp.org iburst' >> "$logfile" 2>&1) || error "error" "$action" "$?"