You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
koreader/platform/kobo/disable-wifi.sh

20 lines
448 B
Bash

#!/bin/sh
# Disable wifi, and remove all modules.
killall udhcpc default.script wpa_supplicant 2>/dev/null
wlarm_le -i eth0 down
ifconfig eth0 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 200000
rmmod -r $WIFI_MODULE
fi
if lsmod | grep -q sdio_wifi_pwr ; then
usleep 200000
rmmod -r sdio_wifi_pwr
fi