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

pull/1/head
ben 12 months ago
parent 0e78201643
commit 18057c7b1c

@ -259,42 +259,43 @@ set_easymesh() {
add_dawn add_dawn
if [ "$ap_mode" = 1 ]; then if [ "$ap_mode" = 1 ]; then
cp /etc/config/wireless /etc/config/wireless.backup # Backup Configurations
cp /etc/config/network /etc/config/network.backup cp /etc/config/wireless /etc/config/wireless.backup
uci set network.lan.type='bridge' cp /etc/config/network /etc/config/network.backup
# assign WAN physical interface to LAN (will be available as an additional LAN port now) cp /etc/config/dhcp /etc/config/dhcp.backup
uci set network.lan.ifname="$(uci get network.lan.ifname) $(uci get network.wan.ifname)"
uci del network.wan.ifname # Configure Bridge and Interfaces
# Remove wan logical interface, since we will not need it. uci set network.lan.type='bridge'
# uci del network.wan uci set network.lan.ifname="$(uci get network.lan.ifname) $(uci get network.wan.ifname)"
uci set wireless.mesh_$apall.mesh_fwding='1' uci del network.wan.ifname
uci commit dhcp; echo '' > /etc/config/dhcp uci set wireless.mesh_$apall.mesh_fwding='1'
/etc/init.d/dnsmasq disable
/etc/init.d/dnsmasq stop # Disable dnsmasq
uci commit dhcp; echo '' > /etc/config/dhcp
echo switching the lan interface to DHCP client /etc/init.d/dnsmasq disable
uci del network.lan.broadcast /etc/init.d/dnsmasq stop
uci del network.lan.dns
uci del network.lan.gateway # Switch LAN to DHCP Client
uci del network.lan.ipaddr echo "Switching the LAN interface to DHCP client"
uci del network.lan.netmask uci del network.lan.broadcast
uci set network.lan.proto='dhcp' uci del network.lan.dns
#uci set dhcp.lan.dynamicdhcp='0' uci del network.lan.gateway
#uci set dhcp.lan.ignore='1' uci del network.lan.ipaddr
uci set system.@system[0].hostname=$gateway uci del network.lan.netmask
uci set network.lan.hostname="`uci get system.@system[0].hostname`" uci set network.lan.proto='dhcp'
uci set system.@system[0].hostname=$gateway
uci commit uci set network.lan.hostname="`uci get system.@system[0].hostname`"
sync
/etc/init.d/network restart # Commit Changes and Restart Network
uci commit
#echo removing firewall config sync
#mv /etc/config/firewall /etc/config/firewall.restore /etc/init.d/network restart
# reboot the device # Reboot the device
echo "Rebooting the device..."
reboot reboot
fi fi
else else
ap_mode_stop ap_mode_stop

Loading…
Cancel
Save