mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-25 14:57:19 +00:00
Add wpa_supplicant daemon that works properly for the wlanold interface.
With this addition, the bonding now works correctly. Ethernet is used when available/connected, and will fallback to Wifi when not. As soon as Ethernet does become available again, the bonding will switch to it as priority.
This commit is contained in:
parent
2736fc299d
commit
9d78ea2ea6
@ -93,14 +93,20 @@ rename_interface() {
|
||||
eth_wlan_up() {
|
||||
##Run DHCP client, and bind mount our fake wpa_cli.sh to fool iCamera
|
||||
ifconfig wlan0 up
|
||||
|
||||
pkill udhcpc
|
||||
udhcpc -i wlan0 -x hostname:$HOSTNAME -p /var/run/udhcpc.pid -b
|
||||
|
||||
# Kill any existing wpa_supplicant that might be running
|
||||
# and spawn our own instead
|
||||
/opt/wz_mini/bin/busybox killall wpa_supplicant
|
||||
wpa_supplicant -D nl80211 -i wlanold -c /tmp/wpa_supplicant.conf -B -s
|
||||
|
||||
if [[ "$V2" == "true" ]]; then
|
||||
mount -o bind /opt/wz_mini/bin/wpa_cli.sh /system/bin/wpa_cli
|
||||
else
|
||||
mount -o bind /opt/wz_mini/bin/wpa_cli.sh /bin/wpa_cli
|
||||
fi
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
@ -245,7 +251,7 @@ if [[ "$ENABLE_USB_ETH" == "true" ]]; then
|
||||
done
|
||||
|
||||
# Insert the bonding driver when running Ethernet
|
||||
insmod $KMOD_PATH/kernel/drivers/net/bonding.ko mode=active-backup miimon=100 downdelay=5000 updelay=5000 primary=eth0
|
||||
insmod $KMOD_PATH/kernel/drivers/net/bonding/bonding.ko mode=active-backup miimon=100 downdelay=5000 updelay=5000 primary=eth0
|
||||
|
||||
swap_enable
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user