summaryrefslogtreecommitdiff
path: root/archsetup
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-01-24 13:33:06 -0600
committerCraig Jennings <c@cjennings.net>2026-01-24 13:33:06 -0600
commit364fa17f9578b51f9a8e950684ee910e911ced59 (patch)
treef32f67caeb353997ed2234b8a106eec31e1249e2 /archsetup
parent6011f90328d88a2c449442d6a31fef3614926ec9 (diff)
fix(archsetup): code cleanup and style fixes
- Remove commented-out reflector code (timer handles updates) - Fix arithmetic expressions (remove unnecessary inner $) - Simplify file truncation (: > instead of cat /dev/null >) - Fix Xorg heredoc indentation - Add shellcheck bulk cleanup as priority D task
Diffstat (limited to 'archsetup')
-rwxr-xr-xarchsetup29
1 files changed, 8 insertions, 21 deletions
diff --git a/archsetup b/archsetup
index edd379f..7547629 100755
--- a/archsetup
+++ b/archsetup
@@ -697,19 +697,6 @@ prerequisites() {
--save /etc/pacman.d/mirrorlist
EOF
- # Skip running reflector during installation - it can cause SSH disconnections during testing
- # The reflector.timer will update mirrors automatically later
- # action="updating repository mirrors" && display "task" "$action"
- # (reflector --connection-timeout 3 \
- # --download-timeout 3 \
- # --protocol https \
- # --age 12 \
- # --latest 20 \
- # --score 10 \
- # --fastest 5 \
- # --sort score \
- # --save /etc/pacman.d/mirrorlist > /dev/null 2>&1)
-
action="enabling the reflector timer" && display "task" "$action"
(systemctl enable reflector.timer >> "$logfile" 2>&1) || \
error_warn "$action" "$?"
@@ -1219,10 +1206,10 @@ xorg() {
done
# disallow vt switching or zapping the xorg server to bypass screen lock
- cat << EOF > /etc/X11/xorg.conf.d/00-no-vt-or-zap.conf
- Section "ServerFlags"
- Option "DontVTSwitch" "True"
- Option "DontZap" "True"
+ cat << 'EOF' > /etc/X11/xorg.conf.d/00-no-vt-or-zap.conf
+Section "ServerFlags"
+ Option "DontVTSwitch" "True"
+ Option "DontZap" "True"
EndSection
EOF
action="configuring xorg server" && display "task" "$action"
@@ -1712,7 +1699,7 @@ boot_ux() {
fi
action="removing distro and date/time from initial screen" && display "task" "$action"
- (cat /dev/null >/etc/issue) || error_warn "$action" "$?"
+ (: >/etc/issue) || error_warn "$action" "$?"
action="preventing kernel messages on the console" && display "task" "$action"
(echo "kernel.printk = 3 3 3 3" >/etc/sysctl.d/20-quiet-printk.conf) || \
@@ -1795,9 +1782,9 @@ outro() {
action="comparing timestamps" && display "task" "$action"
ENDTIME=$(date +%s)
- totalsecs=$(($ENDTIME - $STARTTIME))
- mins=$(($totalsecs / 60))
- secs=$(($totalsecs % 60))
+ totalsecs=$((ENDTIME - STARTTIME))
+ mins=$((totalsecs / 60))
+ secs=$((totalsecs % 60))
new_packages=$(wc -l < "$archsetup_packages")