Update 'root/etc/init.d/easymesh'

pull/1/head
ben 1 year ago
parent cf119a2aa2
commit 5b9996cfb3

@ -292,6 +292,25 @@ set_easymesh() {
uci set network.lan.proto='dhcp' uci set network.lan.proto='dhcp'
uci set system.@system[0].hostname=$gateway uci set system.@system[0].hostname=$gateway
uci set network.lan.hostname="`uci get system.@system[0].hostname`" 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 # Commit Changes and Restart Network
uci commit uci commit

Loading…
Cancel
Save