mirror of
https://github.com/koreader/koreader
synced 2024-11-16 06:12:56 +00:00
668eee97fa
Update shellcheck and shfmt to the latest version. Fixes <https://github.com/koreader/koreader/issues/5152>. Btw, you can apply shellcheck suggestions with a command like: ``` shellcheck --include=SC2250 -f diff *.sh | git apply ```
19 lines
662 B
Bash
Executable File
19 lines
662 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Load wifi modules and enable wifi.
|
|
|
|
lsmod | grep -q sdio_wifi_pwr || insmod "/drivers/${PLATFORM}/wifi/sdio_wifi_pwr.ko"
|
|
# Moar sleep!
|
|
usleep 250000
|
|
# WIFI_MODULE_PATH = /drivers/$PLATFORM/wifi/$WIFI_MODULE.ko
|
|
lsmod | grep -q "${WIFI_MODULE}" || insmod "${WIFI_MODULE_PATH}"
|
|
# Race-y as hell, don't try to optimize this!
|
|
sleep 1
|
|
|
|
ifconfig "${INTERFACE}" up
|
|
[ "${WIFI_MODULE}" != "8189fs" ] && [ "${WIFI_MODULE}" != "8192es" ] && wlarm_le -i "${INTERFACE}" up
|
|
|
|
pidof wpa_supplicant >/dev/null ||
|
|
env -u LD_LIBRARY_PATH \
|
|
wpa_supplicant -D wext -s -i "${INTERFACE}" -O /var/run/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -B
|