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

pull/1/head
ben 1 year ago
parent 63234790db
commit ed5f0674d5

@ -261,22 +261,30 @@ set_easymesh() {
if [ "$ap_mode" = 1 ]; then if [ "$ap_mode" = 1 ]; then
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
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 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'
for i in firewall dnsmasq odhcpd; do uci commit dhcp; echo '' > /etc/config/dhcp
if /etc/init.d/"$i" enabled; then /etc/init.d/dnsmasq disable
/etc/init.d/"$i" disable /etc/init.d/dnsmasq stop
/etc/init.d/"$i" stop
fi
done
echo switching the lan interface to DHCP client echo switching the lan interface to DHCP client
uci del network.lan.broadcast
uci del network.lan.dns
uci del network.lan.gateway
uci del network.lan.ipaddr
uci del network.lan.netmask
uci set network.lan.proto='dhcp' uci set network.lan.proto='dhcp'
uci delete network.wan
uci delete network.wan6
uci delete network.lan.ipaddr
uci delete network.lan.netmask
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 commit uci commit
sync
/etc/init.d/network restart
echo removing firewall config echo removing firewall config
mv /etc/config/firewall /etc/config/firewall.restore mv /etc/config/firewall /etc/config/firewall.restore

Loading…
Cancel
Save