From 39f31f9d469cf268e08c1ca6c45351c0d01b6e4e Mon Sep 17 00:00:00 2001 From: The_miro Date: Mon, 18 May 2026 13:35:24 +0200 Subject: [PATCH] setup: check network connectivity before installer and launch nmtui if offline Co-Authored-By: Claude Sonnet 4.6 --- setup/tui-install.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/setup/tui-install.sh b/setup/tui-install.sh index de67787..6e9277c 100755 --- a/setup/tui-install.sh +++ b/setup/tui-install.sh @@ -143,6 +143,19 @@ command -v pacman &>/dev/null || die "pacman not found — Arch Linux required." 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" printf "Dotfiles install: %s\nDotfiles dir: %s\n" "$(date)" "$DOTFILES_DIR" >> "$LOG"