* Unbreak Wi-Fi on Kobo w/ FX >= 4.23+
Stop relying on WIFI_MODULE_PATH, it's no longer exported by the init
script.
Fix#6500
* Resync the nickel restart script w/ upstream
Let udev handle the SD card, and actually allow nickel to see those events by re-creating the FIFO ourselves, to avoid races.
@ -66,19 +66,20 @@ if lsmod | grep -q sdio_wifi_pwr; then
rmmod sdio_wifi_pwr
rmmod sdio_wifi_pwr
fi
fi
# Recreate Nickel's FIFO ourselves, otherwise, udev may attempt to write to it before Nickel creates it,
# and Nickel doesn't handle that well (i.e., it doesn't unlink first, the FIFO isn't created, it's now a regular file, hilarity ensues).
# Plus, we actually *do* want the stuff udev writes in there to be processed by Nickel, anyway.
rm -f "/tmp/nickel-hardware-status"
mkfifo "/tmp/nickel-hardware-status"
# Flush buffers to disk, who knows.
# Flush buffers to disk, who knows.
sync
sync
# And finally, simply restart nickel.
# And finally, simply restart nickel.
# We don't care about horribly legacy stuff, because if people switch between nickel and KOReader in the first place, I assume they're using a decently recent enough FW version.
# We don't care about horribly legacy stuff, because if people switch between nickel and KOReader in the first place, I assume they're using a decently recent enough FW version.
# Last tested on an H2O & a Forma running FW 4.7.x - 4.12.x
# Last tested on an H2O & a Forma running FW 4.7.x - 4.23.x