From 2a2f99d407b3525344ec6ad47bb7c74fd370e49a Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 13 Dec 2024 11:50:32 -0400 Subject: [PATCH] Don't allow wlan0 to be renamed --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2b1a7f0..91de1c5 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,6 @@ spirilink-driver: @echo "SpiriLink driver installation complete." -# Configure SpiriLink interface .PHONY: configure-spirilink configure-spirilink: @echo "Configuring SpiriLink interface as spir0..." @@ -131,6 +130,11 @@ configure-spirilink: echo "Error: SpiriLink interface not detected."; \ exit 1; \ fi; \ + if [ "$$spirilink_iface" = "wlan0" ]; then \ + echo "Error: SpiriLink not detected"; \ + echo "Please reboot the system and run the script again."; \ + exit 1; \ + fi; \ echo "Detected SpiriLink interface: $$spirilink_iface"; \ mac_address=$$(cat /sys/class/net/$$spirilink_iface/address); \ echo "Detected MAC address: $$mac_address"; \ @@ -149,7 +153,6 @@ configure-spirilink: @$(SUDO) systemctl restart NetworkManager @echo "SpiriLink configuration complete." - # Install SpiriLink software .PHONY: spirilink-software spirilink-software: