|
|
@ -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
|
|
|
|