From 1ba9e0a8aa8b61305e6788b9d375edea3f8656a8 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 9 Oct 2026 15:54:59 +0000 Subject: [PATCH] Install WiFi tools (wpasupplicant, iw) in the base kiosk install A default Ubuntu Server 26.04 install only gets wpasupplicant/iw when WiFi is configured in the installer's network screen (they're not in the server manifest otherwise). Without them netplan can't join a WiFi network and Core Settings -> WiFi stops at "No WiFi tools found" - which is exactly the offline-first case: install with no network, then use the kiosk's WiFi menu to connect. - Add wpasupplicant and iw to PROVISION_APT_PACKAGES, so first boot installs them in step 1 (from the offline bundle when there's no internet) - before Core Settings -> WiFi is offered. +1.6 MB in the bundle. - wifi_menu installs them itself (via run_with_offline_fallback) if they're missing, instead of erroring with an apt command to run. Bundle rebuilt: contains wpasupplicant and iw. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Cjz8a58eB5P9sUweqd3NHm --- Readme.md | 1 + lib/provision.sh | 5 +++++ menus/wifi.sh | 12 ++++++++++++ 3 files changed, 18 insertions(+) diff --git a/Readme.md b/Readme.md index e19ed4b..62ba852 100644 --- a/Readme.md +++ b/Readme.md @@ -1490,6 +1490,7 @@ full migration pass. - **Offline installs** (`--offline`): the ISO carries every package (including CUPS printing and all printer drivers), Node.js 22, and prebuilt Electron/Web UI modules, so a kiosk installs with no internet. With internet it still installs current versions online. Addons → CUPS Printing (menu or Web UI) installs from the bundle by itself when offline. - **Local files as sites:** an absolute path (`/home/kiosk/docs/menu.pdf`) shows a local page, PDF or image; a folder (`/home/kiosk/photos/`) plays as a full-screen **image slideshow** that picks up added/removed images within a minute. Works in both the Sites menu and the Web UI. - **Fix: the first-boot kiosk setup never started on 26.04.** Its service was ordered after cloud-init's final stage, which itself runs after `multi-user.target` - an ordering cycle that systemd broke by dropping the kiosk setup. It also "conflicted" with the tty1 login prompt, which systemd can resolve the same way. Both removed; checked with `systemd-analyze verify` against 26.04's own units. Rebuild the ISO to pick this up. +- **WiFi tools in the base install:** `wpasupplicant` and `iw` are now installed (and bundled offline). A default Ubuntu Server install only has them if WiFi was set up in the installer; without them, Core Settings → WiFi couldn't connect an offline kiosk. The WiFi menu also installs them itself if missing. - **Offline addons:** the `--offline` bundle now also carries LMS (Lyrion) + Squeezelite, Asterisk Intercom, VNC, WireGuard and the Emergency Hotspot; their normal installs use it automatically when there's no internet. - **Emergency Hotspot fix:** by default it now starts only when the local network is unreachable (router *and* internet), not merely when there's no internet - on a LAN without internet it used to start on every boot. Existing setups keep the old check until Advanced → Emergency Hotspot → Reconfigure. - **New: Core Settings → Time Server (NTP)** - use a time server on your network, go back to Ubuntu's, or set the clock by hand; for networks without internet. diff --git a/lib/provision.sh b/lib/provision.sh index bf774b9..82aeb37 100644 --- a/lib/provision.sh +++ b/lib/provision.sh @@ -67,6 +67,11 @@ PROVISION_APT_PACKAGES=( gstreamer1.0-pipewire libspa-0.2-bluetooth systemd-timesyncd acpid xbindkeys xdotool python3-evdev unzip net-tools ncdu evtest + # WiFi: a default Ubuntu Server install only has these if WiFi was set + # up in the installer - without them netplan can't join a WiFi network + # and Core Settings -> WiFi has nothing to scan with. In the base list + # so an offline install gets them (from the bundle) before that menu. + wpasupplicant iw ) PROVISION_INTEL_APT_PACKAGES=( intel-gpu-tools xserver-xorg-video-intel i965-va-driver intel-media-va-driver diff --git a/menus/wifi.sh b/menus/wifi.sh index e81834e..5212991 100644 --- a/menus/wifi.sh +++ b/menus/wifi.sh @@ -31,6 +31,18 @@ wifi_menu() { echo " ═══ WIFI CONFIGURATION ═══" echo + # netplan needs wpa_supplicant to join WiFi at all; iw/wpa_cli scan. + # Missing on a server install that skipped WiFi in the installer - + # install them here (from the offline bundle if there's no internet, + # which is exactly the situation this menu is usually opened in). + if ! command -v wpa_supplicant &>/dev/null || ! command -v iw &>/dev/null; then + echo "WiFi support (wpasupplicant, iw) isn't installed yet - installing..." + if ! run_with_offline_fallback sudo apt install -y wpasupplicant iw; then + log_error "Couldn't install WiFi support (needs internet, wired, or an --offline install ISO)" + return 1 + fi + fi + local has_tools=false if command -v nmcli &>/dev/null || command -v iw &>/dev/null || command -v wpa_cli &>/dev/null; then has_tools=true