From 8903d6d0068bb5edfbc9a6b87ceba8f97833de2a Mon Sep 17 00:00:00 2001 From: Chris Frankland-Wright Date: Sat, 30 Aug 2025 23:48:24 +0100 Subject: [PATCH] DHCP issues --- setup.sh | 76 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 34 deletions(-) diff --git a/setup.sh b/setup.sh index 84b72d6..ca62644 100644 --- a/setup.sh +++ b/setup.sh @@ -261,8 +261,9 @@ if [ "$PKG_MANAGER" == "apt" ]; then echo "✅ nodogsplash installed successfully." # Disable the standalone hostapd service to let NetworkManager manage it. - sudo systemctl disable hostapd - sudo systemctl mask hostapd + # We are now using the classic hostapd service, so unmask it. + sudo systemctl unmask hostapd + sudo systemctl enable hostapd sudo systemctl enable nodogsplash else echo "This script is designed for Debian-based systems like Raspberry Pi OS." @@ -274,41 +275,46 @@ fi sudo systemctl stop hostapd || true sudo systemctl stop dnsmasq || true -# Ensure NetworkManager is managing wlan0 by removing any conflicting configurations. -# This is the critical fix for the "No suitable device" error. -echo "Ensuring NetworkManager is managing wlan0..." -sudo rm -f /etc/NetworkManager/conf.d/99-unmanaged-wlan0.conf +# --- Configure networking for AP mode --- -# Prevent NetworkManager from running its own dnsmasq instance or managing resolv.conf. -# This allows our standalone dnsmasq service to function without conflict. -echo "Configuring NetworkManager to not manage DNS..." -sudo tee /etc/NetworkManager/conf.d/99-disable-dns.conf > /dev/null < /dev/null < /dev/null < /dev/null <