mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
RasPiOS could be running NM backend, test if dhcpcd is running, drop rfkill
This commit is contained in:
parent
c49adcf395
commit
bc4850a09c
1 changed files with 7 additions and 8 deletions
|
@ -3,9 +3,12 @@ IFACE={{ discovered_wireless_iface }}
|
|||
RASPBIAN=0
|
||||
NETPLAN=0
|
||||
SSID=""
|
||||
# when we get here br0 should be available and dbus wpa_supplicant was started if enabled. None
|
||||
# of the backends that use wpa_supplicant should be active yet based on the Before= After= lines
|
||||
# in the iiab-wifi-test.service unit file.
|
||||
# when we get here br0 should be available and dbus wpa_supplicant was started if enabled. Some
|
||||
# of the backends that use wpa_supplicant should be active based on the Before= After= lines in
|
||||
# the iiab-wifi-test.service unit file.
|
||||
|
||||
echo "iiab-test-wifi called"
|
||||
echo "running pid $$"
|
||||
|
||||
# covers systemd-networkd
|
||||
if [ -f /etc/wpa_supplicant/wpa_supplicant-$IFACE.conf ]; then
|
||||
|
@ -14,13 +17,9 @@ if [ -f /etc/wpa_supplicant/wpa_supplicant-$IFACE.conf ]; then
|
|||
fi
|
||||
|
||||
# covers stock raspbian
|
||||
if [ -f /etc/wpa_supplicant/wpa_supplicant.conf ]; then
|
||||
if [ -f /etc/wpa_supplicant/wpa_supplicant.conf ] && [ ! -z $(pgrep dhcpcd) ]; then
|
||||
echo "RasPiOS"
|
||||
RASPBIAN=1
|
||||
if /usr/sbin/rfkill list wifi | grep -q "Soft blocked: yes" ; then
|
||||
echo "unblocking WiFi"
|
||||
rfkill unblock wifi
|
||||
fi
|
||||
SSID=$(grep ssid /etc/wpa_supplicant/wpa_supplicant.conf | awk -F = '{print $2}' | sed -r s/\"// | sed -r s/\"//)
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue