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

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

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

Loading…
Cancel
Save