2021-01-19 20:09:17 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
read -r MACHINE_TYPE <"/sys/devices/soc0/machine"
|
|
|
|
if [ "reMarkable 2.0" = "${MACHINE_TYPE}" ]; then
|
2021-02-02 02:19:37 +00:00
|
|
|
if ! lsmod | grep -q brcmfmac; then
|
2021-01-19 20:09:17 +00:00
|
|
|
modprobe brcmfmac
|
|
|
|
fi
|
2021-02-02 02:19:37 +00:00
|
|
|
fi
|
2021-01-19 20:09:17 +00:00
|
|
|
|
2021-02-02 02:19:37 +00:00
|
|
|
# clean stop (if it's running) of main wpa_supplicant service, used by xochitl
|
|
|
|
systemctl stop wpa_supplicant
|
2021-01-19 20:09:17 +00:00
|
|
|
|
2021-02-02 02:19:37 +00:00
|
|
|
# clean stop of non-service wpa_supplicant, if running
|
|
|
|
wpa_cli terminate 2>/dev/null
|
2021-01-19 20:09:17 +00:00
|
|
|
|
2021-02-02 02:19:37 +00:00
|
|
|
sleep 1
|
|
|
|
|
|
|
|
ifconfig wlan0 up
|
|
|
|
wpa_supplicant -i wlan0 -C /var/run/wpa_supplicant -B 2>/dev/null
|