mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Fix networkmgr on Kobo
To avoid potential issues with USBMS. Namely, make sure CWD doesn't point to the userstore for persitent processes. Make sure wpa_supplicant doesn't try to use our own OpenSSL lib, which, again, is in the userstore area. Properly kill our dhcp client invocation on when killing WiFi Also, some related fixes to the startup script: Properly kill wpa_supplicant & the dhcp client when we kill wifi before rebooting to nickel.
This commit is contained in:
@@ -26,11 +26,11 @@ local function koboEnableWifi(toggle)
|
||||
os.execute("sleep 2")
|
||||
os.execute("ifconfig eth0 up")
|
||||
os.execute("wlarm_le -i eth0 up")
|
||||
os.execute("pidof wpa_supplicant >/dev/null || wpa_supplicant -s -i eth0 -c /etc/wpa_supplicant/wpa_supplicant.conf -C /var/run/wpa_supplicant -B")
|
||||
os.execute("pidof wpa_supplicant >/dev/null || cd / && env -u LD_LIBRARY_PATH wpa_supplicant -s -i eth0 -c /etc/wpa_supplicant/wpa_supplicant.conf -C /var/run/wpa_supplicant -B")
|
||||
os.execute("sleep 1")
|
||||
os.execute("/sbin/udhcpc -S -i eth0 -s /etc/udhcpc.d/default.script -t15 -T10 -A3 -b -q >/dev/null 2>&1 &")
|
||||
os.execute("cd / && env -u LD_LIBRARY_PATH /sbin/udhcpc -S -i eth0 -s /etc/udhcpc.d/default.script -t15 -T10 -A3 -b -q >/dev/null 2>&1 &")
|
||||
else
|
||||
os.execute("killall udhcpc wpa_supplicant 2>/dev/null")
|
||||
os.execute("killall udhcpc default.script wpa_supplicant 2>/dev/null")
|
||||
os.execute("wlarm_le -i eth0 down")
|
||||
os.execute("ifconfig eth0 down")
|
||||
os.execute("rmmod -r dhd")
|
||||
|
||||
Reference in New Issue
Block a user