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.
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Disable wifi, and remove all modules.
|
|
|
|
|
|
|
|
killall udhcpc default.script wpa_supplicant 2>/dev/null
|
|
|
|
|
[chore] A round of Kobo specific script cleanup (#3876)
* Flag those scripts as executable in git
Somewhat irrelevant because we'll end up living on a FAT32 drive, but,
still.
* Cleanup Kobo startup script
Support KFMon >= 0.9.5
Don't siphon PRODUCT from nickel, it's exported by rcS, so fmon/KFMon
already inherit it.
Siphon NICKEL_HOME, on the off-chance nickel fails to figure that one
out for itself on restart.
Siphon LANG (This may be a terrible idea, rcS sets LANG to en_US.UTF-8,
while we set LC_ALL to en_US.UTF-8, but I don't know if nickel itself
ever updates LANG, since I have mine set to en_US also ;)).
My secret hope if that everything's working as it should and this ensures
we default to Nickel's locale on fresh installs?
Remove the extra sync on startup, both @Baskerville's fmon and KFMon are
smart enough not to do anything overly stupid, and recent FW versions
have a slightly more resilient DB anyway (rollback journal -> WAL).
This effectively shaves over a second off our startup time.
* Slimmed down the nickel restart script.
Based on current rcS
Scrapped a bucketload of irrelevant & legacy crap, since we're never
bootstrapping nickel, only restarting it.
* Update Kobo install instrcutions.
Point to KSM09, @Baskerville's fmon, and KFMon.
Deprecate legacy fmon, and as such, stop shipping a useless KoboRoot
tarball.
6 years ago
|
|
|
[ "${WIFI_MODULE}" != "8189fs" ] && 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
|