2021-01-19 20:09:17 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2024-01-15 03:38:30 +00:00
|
|
|
# load brcmfmac kernel module
|
|
|
|
if ! grep -q "^brcmfmac " "/proc/modules"; then
|
|
|
|
modprobe brcmfmac
|
|
|
|
sleep 1
|
2021-02-02 02:19:37 +00:00
|
|
|
fi
|
2021-01-19 20:09:17 +00:00
|
|
|
|
2024-01-15 03:38:30 +00:00
|
|
|
# stop wpa_supplicant service cleanly, used by xochitl
|
|
|
|
if systemctl is-active -q wpa_supplicant; then
|
|
|
|
systemctl stop wpa_supplicant
|
|
|
|
fi
|
2021-01-19 20:09:17 +00:00
|
|
|
|
2024-01-15 03:38:30 +00:00
|
|
|
# stop non-service wpa_supplicant cleanly
|
|
|
|
if pidof wpa_supplicant; then
|
|
|
|
wpa_cli terminate
|
|
|
|
fi
|
2021-02-02 02:19:37 +00:00
|
|
|
|
2024-01-15 03:38:30 +00:00
|
|
|
# power up wifi interface
|
2021-02-02 02:19:37 +00:00
|
|
|
ifconfig wlan0 up
|
2024-01-15 03:38:30 +00:00
|
|
|
|
|
|
|
# make sure dhcpcd is running
|
|
|
|
if ! systemctl is-active -q dhcpcd; then
|
|
|
|
systemctl start dhcpcd
|
|
|
|
fi
|
|
|
|
|
|
|
|
wpa_supplicant -i wlan0 -C /var/run/wpa_supplicant -B
|