mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-25 06:47:18 +00:00
Ensure bonding is only used if ethernet is also used.
This commit is contained in:
parent
cdc6119fac
commit
d94a7637d0
@ -125,7 +125,7 @@ eth_wlan_up() {
|
||||
|
||||
# If running with Interface Bonding enabled, kill any existing
|
||||
# wpa_supplicant that might be running and spawn our own instead
|
||||
if [[ "$BONDING_ENABLED" == "true" ]]; then
|
||||
if [[ "$BONDING_ENABLED" == "true" ]] && [[ "$ENABLE_USB_ETH" == "true" ]]; then
|
||||
/opt/wz_mini/bin/busybox killall wpa_supplicant
|
||||
wpa_supplicant -D nl80211 -i wlanold -c /tmp/wpa_supplicant.conf -B -s
|
||||
fi
|
||||
@ -163,7 +163,7 @@ wlanold_check() {
|
||||
eth_wlan_up
|
||||
else
|
||||
echo "wlanold doesn't exist"
|
||||
if [[ "$BONDING_ENABLED" == "true" ]]; then
|
||||
if [[ "$BONDING_ENABLED" == "true" ]] && [[ "$ENABLE_USB_ETH" == "true" ]]; then
|
||||
rename_interface_and_setup_bonding bond0 "$BONDING_PRIMARY_INTERFACE" "$BONDING_SECONDARY_INTERFACE"
|
||||
else
|
||||
rename_interface $1
|
||||
@ -284,7 +284,23 @@ if [[ "$ENABLE_USB_ETH" == "true" ]]; then
|
||||
done
|
||||
|
||||
if [[ "$BONDING_ENABLED" == "true" ]]; then
|
||||
# Insert the bonding driver if requested
|
||||
if [[ "$BONDING_LINK_MONITORING_FREQ_MS" == "" ]]; then
|
||||
"$BONDING_LINK_MONITORING_FREQ_MS" = "100"
|
||||
fi
|
||||
if [[ "$BONDING_DOWN_DELAY_MS" == "" ]]; then
|
||||
"$BONDING_DOWN_DELAY_MS" = "5000"
|
||||
fi
|
||||
if [[ "$BONDING_UP_DELAY_MS" == "" ]]; then
|
||||
"$BONDING_UP_DELAY_MS" = "5000"
|
||||
fi
|
||||
if [[ "$BONDING_PRIMARY_INTERFACE" == "" ]]; then
|
||||
"$BONDING_PRIMARY_INTERFACE" = "eth0"
|
||||
fi
|
||||
if [[ "$BONDING_SECONDARY_INTERFACE" == "" ]]; then
|
||||
"$BONDING_SECONDARY_INTERFACE" = "wlan0"
|
||||
fi
|
||||
|
||||
# Insert the bonding driver into the kernel
|
||||
insmod $KMOD_PATH/kernel/drivers/net/bonding/bonding.ko mode=active-backup miimon="$BONDING_LINK_MONITORING_FREQ_MS" downdelay="$BONDING_DOWN_DELAY_MS" updelay="$BONDING_UP_DELAY_MS" primary="$BONDING_PRIMARY_INTERFACE"
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user