From fdddf4eb760f8fa1dbc46c90579a700980c81d83 Mon Sep 17 00:00:00 2001 From: Chris Frankland-Wright Date: Sun, 31 Aug 2025 10:56:22 +0100 Subject: [PATCH] revert to dchcpcd --- setup.sh | 48 ++++++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/setup.sh b/setup.sh index 49fb3f0..cd6de12 100644 --- a/setup.sh +++ b/setup.sh @@ -294,25 +294,34 @@ EOF sudo rm -f /etc/NetworkManager/conf.d/99-disable-dns.conf sudo systemctl reload NetworkManager -# Configure a static IP for wlan0 using dhcpcd. -echo "Configuring static IP for wlan0 via dhcpcd..." -# Ensure dhcpcd is installed -sudo apt install -y dhcpcd5 +# --- Configure networking for AP mode (using /etc/network/interfaces) --- -# First, remove any existing configurations for wlan0 to prevent conflicts. -# This is a more robust way to ensure our settings are applied. -sudo sed -i '/^interface wlan0/,/^\s*$/d' /etc/dhcpcd.conf +# 1. Uninstall dhcpcd5 to prevent any conflicts. +echo "Removing dhcpcd5 to switch to /etc/network/interfaces..." +sudo apt-get remove --purge -y dhcpcd5 || true +sudo systemctl disable dhcpcd || true -# Now, add our static IP config to the end of the file. -sudo tee -a /etc/dhcpcd.conf > /dev/null < /dev/null <