fix bonding setup

This commit is contained in:
Alfonso Gamboa
2022-07-31 16:29:25 -07:00
parent 5be0fd7ff5
commit 2ba9869b96
5 changed files with 23 additions and 10 deletions

View File

@@ -3,8 +3,6 @@
source /opt/wz_mini/etc/rc.common
source /opt/wz_mini/wz_mini.conf
set -x
bonding_setup() {
#we need to wait until wlan0 is up with the modified HWaddr
@@ -15,6 +13,9 @@ bonding_setup() {
## $1 Bonding Interface, $2 Primary Interface, $3 Secondary Interface
echo "renaming interfaces"
#Prevent iCamera from cycling the wlan0 interface
mount --bind /opt/wz_mini/usr/bin/restart_wlan0.sh /system/bin/restart_wlan0.sh
# Bring all interfaces down
ifconfig bond0 down
ifconfig $BONDING_PRIMARY_INTERFACE down
@@ -71,6 +72,6 @@ bonding_setup() {
}
if [[ "$BONDING_ENABLED" == "true" ]]; then
if [[ "$BONDING_ENABLED" == "true" ]] && ([[ "$ENABLE_USB_ETH" == "true" ]] || [[ "$ENABLE_USB_DIRECT" == "true" ]]); then
bonding_setup &
fi

View File

@@ -1,10 +1,18 @@
#!/bin/sh
source /opt/wz_mini/etc/rc.common
set -x
core() {
while ! pgrep -f "dumpload" > /dev/null; do
pkill -f dumpload #Kill dumpload so it won't waste cpu or ram gathering cores and uploading them when something crashes
done
#Kill dumpload so it won't waste cpu or ram gathering cores and uploading them when something crashes
wait_for_wlan_wpa
echo "killing dumpload"
/opt/wz_mini/bin/busybox pkill -f dumpload
}
sysctl -w kernel.core_pattern='|/bin/false'
core &

View File

@@ -1 +1 @@
Sun Jul 31 03:20:36 PM PDT 2022
Sun Jul 31 04:29:05 PM PDT 2022

View File

@@ -0,0 +1,3 @@
#!/bin/sh
echo "up"