From a1020a7b15a2745114335542866794ae54f6f68e Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 8 Nov 2023 21:17:46 +0000 Subject: [PATCH] Update 'root/etc/init.d/easymesh' --- root/etc/init.d/easymesh | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/root/etc/init.d/easymesh b/root/etc/init.d/easymesh index c7f5ae9..1427751 100755 --- a/root/etc/init.d/easymesh +++ b/root/etc/init.d/easymesh @@ -301,39 +301,9 @@ uci set network.lan.gateway=$dns uci set system.@system[0].hostname=$gateway # Configure LAN bridge and add ethernet interfaces to the bridge -# uci set network.lan.ifname='eth0 eth1 wan lan1 lan2 lan3' # Add ethernet interfaces and the kitchen sink here +uci set network.lan.ifname='eth0 eth1 wan lan1 lan2 lan3' # Add ethernet interfaces and the kitchen sink here uci set network.lan.type='bridge' -# List of interfaces to ensure are part of the bridge -declare -a interfaces_to_check=('bat0' 'eth0' 'eth1' 'lan1' 'lan2' 'wan') - -# Load the network configuration -config_load network - -# Get the current list of bridge ports for 'br-lan' -config_get bridge_ports br-lan ports - -# Convert the list to an array -IFS=' ' -read -ra current_ports <<< "$bridge_ports" - -# Function to check and add interface to br-lan if not present -add_interface_to_bridge() { - local interface=$1 - if [[ ! " ${current_ports[*]} " =~ " ${interface} " ]]; then - # Interface not found in current bridge ports, add it - uci add_list network.br-lan.ports="$interface" - echo "Interface ${interface} added to br-lan." - else - echo "Interface ${interface} is already part of br-lan." - fi -} - -# Loop through each interface and check/add to bridge -for interface in "${interfaces_to_check[@]}"; do - add_interface_to_bridge "$interface" -done - # If you also need to configure the wireless network to be part of the bridge: uci set wireless.default_$apall.network='lan' # Make sure the Wi-Fi is part of the lan network