From 5b9996cfb35d73c14d625253573d21cb7652de52 Mon Sep 17 00:00:00 2001 From: ben Date: Sun, 1 Oct 2023 20:34:18 +0000 Subject: [PATCH] Update 'root/etc/init.d/easymesh' --- root/etc/init.d/easymesh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/root/etc/init.d/easymesh b/root/etc/init.d/easymesh index 31aca7d..e1d7a6c 100755 --- a/root/etc/init.d/easymesh +++ b/root/etc/init.d/easymesh @@ -292,6 +292,25 @@ set_easymesh() { uci set network.lan.proto='dhcp' uci set system.@system[0].hostname=$gateway uci set network.lan.hostname="`uci get system.@system[0].hostname`" + + # Add WAN to br-lan bridge + echo "Adding WAN to br-lan bridge" + uci set network.lan.ifname="$(uci get network.lan.ifname) eth1" # assuming eth1 is your WAN interface + uci commit network + + # Delete WAN zone from firewall + echo "Deleting the WAN zone from the firewall" + wan_zone=$(uci show firewall | grep '=zone' | grep '.name=' | grep 'wan' | cut -d'.' -f2) + if [ ! -z "$wan_zone" ]; then + uci delete firewall.$wan_zone + echo "WAN zone deleted" + else + echo "No WAN zone found" + fi + + # Commit the changes + uci commit firewall + uci commit network # Commit Changes and Restart Network uci commit