setup: check network connectivity before installer and launch nmtui if offline
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
089841f5d3
commit
39f31f9d46
|
|
@ -143,6 +143,19 @@ command -v pacman &>/dev/null || die "pacman not found — Arch Linux required."
|
||||||
|
|
||||||
require_dialog
|
require_dialog
|
||||||
|
|
||||||
|
if ! ping -c1 -W3 archlinux.org &>/dev/null; then
|
||||||
|
dialog --backtitle "$BACKTITLE" \
|
||||||
|
--title " No Network Detected " \
|
||||||
|
--msgbox "\n No internet connection found.\n\n nmtui will open so you can configure networking.\n Close nmtui when done to continue the installer.\n" 11 58
|
||||||
|
nmtui
|
||||||
|
if ! ping -c1 -W3 archlinux.org &>/dev/null; then
|
||||||
|
dialog --backtitle "$BACKTITLE" \
|
||||||
|
--title " Still Offline " \
|
||||||
|
--yesno "\n Still no internet connection.\n\n Packages cannot be downloaded without network access.\n\n Continue anyway?" 11 58 \
|
||||||
|
|| { clear; echo "Aborted — no network."; exit 1; }
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
> "$LOG"
|
> "$LOG"
|
||||||
printf "Dotfiles install: %s\nDotfiles dir: %s\n" "$(date)" "$DOTFILES_DIR" >> "$LOG"
|
printf "Dotfiles install: %s\nDotfiles dir: %s\n" "$(date)" "$DOTFILES_DIR" >> "$LOG"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue