2
0
mirror of https://github.com/koreader/koreader synced 2024-11-16 06:12:56 +00:00
koreader/platform/kobo/disable-wifi.sh
NiLuJe e2a0929c51
Better KOA2 support (#4037)
* Better KOA2 support
    * Fix FL
    * Add physical pageturn keys
    * Add accelerometer support
* Possibly better NaturalLight handling on the Clara
* Fix WiFi module name used in some(?) Mk7 Kobos
* A bunch of kodev fixes
2018-07-01 17:35:12 +02:00

20 lines
540 B
Bash
Executable File

#!/bin/sh
# Disable wifi, and remove all modules.
killall udhcpc default.script wpa_supplicant 2>/dev/null
[ "${WIFI_MODULE}" != "8189fs" ] && [ "${WIFI_MODULE}" != "8192es" ] && wlarm_le -i "${INTERFACE}" down
ifconfig "${INTERFACE}" down
# Some sleep in between may avoid system getting hung
# (we test if a module is actually loaded to avoid unneeded sleeps)
if lsmod | grep -q "${WIFI_MODULE}"; then
usleep 250000
rmmod "${WIFI_MODULE}"
fi
if lsmod | grep -q sdio_wifi_pwr; then
usleep 250000
rmmod sdio_wifi_pwr
fi