From 364fa17f9578b51f9a8e950684ee910e911ced59 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 24 Jan 2026 13:33:06 -0600 Subject: 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 --- archsetup | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) (limited to 'archsetup') 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") -- cgit v1.2.3