This is the file that determines if the wifi location has been set so i wanted to know how to alter it so it checks to see if the wifi-country is not set to enable instead. Any ideas?? So basically work in reverse.
I have tried disabling the service from running that executes this file but no luck.
sudo nano /usr/lib/raspberrypi-sys-mods/wifi-country
#!/bin/sh
if ! /bin/grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]0[dD][0-9a-fA-F]$' /proc/cpuinfo ; then
exit 0
fi
if /bin/grep -q "^country=[A-Z][A-Z]" /etc/wpa_supplicant/wpa_supplicant.conf; then
exit 0
fi
if [ ! -x "/usr/sbin/rfkill" ]; then
echo "rfkill not installed"
exit 1
fi
mkdir -p "/var/lib/systemd/rfkill"
address="$(/bin/grep -m 1 /mmc /proc/iomem | /usr/bin/cut -f1 -d-)"
if [ -z "$address" ]; then
echo "Could not determine WiFi iomem address"
exit 1
fi
persist_file="/var/lib/systemd/rfkill/platform-$address.mmc:wlan"
/bin/echo 1 > "$persist_file"
/usr/bin/touch /run/wifi-country-unset
/bin/echo "Wi-Fi is disabled because the country is not set"