update-10.24
This commit is contained in:
parent
e7489de8e4
commit
eac74c8a70
|
@ -50,7 +50,8 @@ config CDNSPEEDTEST_COMPRESS_GOPROXY
|
||||||
|
|
||||||
config CDNSPEEDTEST_COMPRESS_UPX
|
config CDNSPEEDTEST_COMPRESS_UPX
|
||||||
bool "Compress executable files with UPX"
|
bool "Compress executable files with UPX"
|
||||||
default y
|
depends on !mips64
|
||||||
|
default y if mips||mipsel
|
||||||
endef
|
endef
|
||||||
|
|
||||||
ifeq ($(CONFIG_CDNSPEEDTEST_COMPRESS_GOPROXY),y)
|
ifeq ($(CONFIG_CDNSPEEDTEST_COMPRESS_GOPROXY),y)
|
||||||
|
|
|
@ -4,23 +4,22 @@ STOP=10
|
||||||
|
|
||||||
enable=$(uci get easymesh.config.enabled 2>/dev/null)
|
enable=$(uci get easymesh.config.enabled 2>/dev/null)
|
||||||
mesh_bat0=$(uci get network.bat0 2>/dev/null)
|
mesh_bat0=$(uci get network.bat0 2>/dev/null)
|
||||||
mesh_nwi_mesh0=$(uci get network.nwi_mesh0 2>/dev/null)
|
|
||||||
ap_mode=$(uci get easymesh.config.ap_mode 2>/dev/null)
|
ap_mode=$(uci get easymesh.config.ap_mode 2>/dev/null)
|
||||||
lan=$(uci get network.lan.ifname 2>/dev/null)
|
|
||||||
ipaddr=$(uci get easymesh.config.ipaddr 2>/dev/null)
|
ipaddr=$(uci get easymesh.config.ipaddr 2>/dev/null)
|
||||||
netmask=$(uci get easymesh.config.netmask 2>/dev/null)
|
netmask=$(uci get easymesh.config.netmask 2>/dev/null)
|
||||||
gateway=$(uci get easymesh.config.gateway 2>/dev/null)
|
gateway=$(uci get easymesh.config.gateway 2>/dev/null)
|
||||||
ap_gateway=$(uci get network.lan.gateway 2>/dev/null)
|
|
||||||
ap_gateway1=$(cat /etc/easymesh | sed -n '1p' 2>/dev/null)
|
|
||||||
dns1=$(cat /etc/easymesh | sed -n '2p' 2>/dev/null)
|
|
||||||
dns=$(uci get easymesh.config.dns 2>/dev/null)
|
dns=$(uci get easymesh.config.dns 2>/dev/null)
|
||||||
|
ap_ipaddr=$(uci get network.lan.ipaddr 2>/dev/null)
|
||||||
|
ap_ipaddr1=$(cat /etc/easymesh | sed -n '1p' 2>/dev/null)
|
||||||
apRadio=$(uci get easymesh.config.apRadio 2>/dev/null)
|
apRadio=$(uci get easymesh.config.apRadio 2>/dev/null)
|
||||||
encryption=$(uci get easymesh.config.encryption 2>/dev/null)
|
|
||||||
kvr=$(uci get easymesh.config.kvr 2>/dev/null)
|
kvr=$(uci get easymesh.config.kvr 2>/dev/null)
|
||||||
brlan=$(uci get network.@device[0].name 2>/dev/null)
|
brlan=$(uci get network.@device[0].name 2>/dev/null)
|
||||||
|
|
||||||
ap_mode_stop(){
|
ap_mode_stop(){
|
||||||
if [ "$ap_gateway" = "$ap_gateway1" ]; then
|
ap_ipaddr=$(uci get network.lan.ipaddr 2>/dev/null)
|
||||||
|
ap_ipaddr1=$(cat /etc/easymesh | sed -n '1p' 2>/dev/null)
|
||||||
|
dns1=$(cat /etc/easymesh | sed -n '2p' 2>/dev/null)
|
||||||
|
if [ "$ap_ipaddr" = "$ap_ipaddr1" ]; then
|
||||||
uci delete network.lan.gateway
|
uci delete network.lan.gateway
|
||||||
uci del_list network.lan.dns=$dns1
|
uci del_list network.lan.dns=$dns1
|
||||||
uci commit network
|
uci commit network
|
||||||
|
@ -42,11 +41,22 @@ add_wifi_mesh(){
|
||||||
mesh_id=$(uci get easymesh.config.mesh_id 2>/dev/null)
|
mesh_id=$(uci get easymesh.config.mesh_id 2>/dev/null)
|
||||||
mobility_domain=$(uci get easymesh.config.mobility_domain 2>/dev/null)
|
mobility_domain=$(uci get easymesh.config.mobility_domain 2>/dev/null)
|
||||||
key=$(uci get easymesh.config.key 2>/dev/null)
|
key=$(uci get easymesh.config.key 2>/dev/null)
|
||||||
|
encryption=$(uci get easymesh.config.encryption 2>/dev/null)
|
||||||
|
mesh_nwi_mesh=$(uci get network.nwi_mesh_${apall} 2>/dev/null)
|
||||||
|
|
||||||
|
if [ "$mesh_nwi_mesh" != "interface" ]; then
|
||||||
|
uci set network.nwi_mesh_$apall=interface
|
||||||
|
uci set network.nwi_mesh_$apall.proto='batadv_hardif'
|
||||||
|
uci set network.nwi_mesh_$apall.mtu='2304'
|
||||||
|
uci set network.nwi_mesh_$apall.master='bat0'
|
||||||
|
uci commit network
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$mesh_apRadio" != "wifi-iface" ]; then
|
if [ "$mesh_apRadio" != "wifi-iface" ]; then
|
||||||
uci set wireless.mesh_$apall=wifi-iface
|
uci set wireless.mesh_$apall=wifi-iface
|
||||||
uci set wireless.mesh_$apall.device=$apall
|
uci set wireless.mesh_$apall.device=$apall
|
||||||
uci set wireless.mesh_$apall.ifname=mesh_${apall}
|
uci set wireless.mesh_$apall.ifname=mesh_${apall}
|
||||||
uci set wireless.mesh_$apall.network='nwi_mesh0'
|
uci set wireless.mesh_$apall.network=nwi_mesh_${apall}
|
||||||
uci set wireless.mesh_$apall.mode='mesh'
|
uci set wireless.mesh_$apall.mode='mesh'
|
||||||
uci set wireless.mesh_$apall.mesh_fwding='0'
|
uci set wireless.mesh_$apall.mesh_fwding='0'
|
||||||
uci set wireless.mesh_$apall.mesh_id=$mesh_id
|
uci set wireless.mesh_$apall.mesh_id=$mesh_id
|
||||||
|
@ -142,14 +152,6 @@ start(){
|
||||||
uci commit network
|
uci commit network
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$mesh_nwi_mesh0" != "interface" ]; then
|
|
||||||
uci set network.nwi_mesh0=interface
|
|
||||||
uci set network.nwi_mesh0.proto='batadv_hardif'
|
|
||||||
uci set network.nwi_mesh0.mtu='2304'
|
|
||||||
uci set network.nwi_mesh0.master='bat0'
|
|
||||||
uci commit network
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$apRadio" = "all" ]; then
|
if [ "$apRadio" = "all" ]; then
|
||||||
for apall in $(uci -X show wireless | grep wifi-device | awk -F'[.=]' '{print $2}'); do
|
for apall in $(uci -X show wireless | grep wifi-device | awk -F'[.=]' '{print $2}'); do
|
||||||
add_wifi_mesh
|
add_wifi_mesh
|
||||||
|
@ -162,7 +164,7 @@ start(){
|
||||||
add_dawn
|
add_dawn
|
||||||
|
|
||||||
if [ "$ap_mode" == 1 ]; then
|
if [ "$ap_mode" == 1 ]; then
|
||||||
if [ "$ap_gateway" != "$gateway" ]; then
|
if [ "$ap_ipaddr" != "$ipaddr" ]; then
|
||||||
uci set network.lan.ipaddr=$ipaddr
|
uci set network.lan.ipaddr=$ipaddr
|
||||||
uci set network.lan.netmask=$netmask
|
uci set network.lan.netmask=$netmask
|
||||||
uci set network.lan.gateway=$gateway
|
uci set network.lan.gateway=$gateway
|
||||||
|
@ -170,7 +172,7 @@ start(){
|
||||||
uci commit network
|
uci commit network
|
||||||
|
|
||||||
echo "" > /etc/easymesh
|
echo "" > /etc/easymesh
|
||||||
echo "$gateway" > /etc/easymesh
|
echo "$ipaddr" > /etc/easymesh
|
||||||
echo "$dns" >> /etc/easymesh
|
echo "$dns" >> /etc/easymesh
|
||||||
|
|
||||||
uci set dhcp.lan.dynamicdhcp='0'
|
uci set dhcp.lan.dynamicdhcp='0'
|
||||||
|
@ -205,13 +207,15 @@ stop(){
|
||||||
uci commit network
|
uci commit network
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$mesh_nwi_mesh0" = "interface" ]; then
|
|
||||||
uci delete network.nwi_mesh0
|
|
||||||
uci commit network
|
|
||||||
fi
|
|
||||||
|
|
||||||
for apall in $(uci -X show wireless | grep wifi-device | awk -F'[.=]' '{print $2}'); do
|
for apall in $(uci -X show wireless | grep wifi-device | awk -F'[.=]' '{print $2}'); do
|
||||||
|
mesh_nwi_mesh=$(uci get network.nwi_mesh_${apall} 2>/dev/null)
|
||||||
mesh_mesh=$(uci get wireless.mesh_${apall} 2>/dev/null)
|
mesh_mesh=$(uci get wireless.mesh_${apall} 2>/dev/null)
|
||||||
|
|
||||||
|
if [ "$mesh_nwi_mesh" = "interface" ]; then
|
||||||
|
uci delete network.nwi_mesh_$apall
|
||||||
|
uci commit network
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$mesh_mesh" = "wifi-iface" ]; then
|
if [ "$mesh_mesh" = "wifi-iface" ]; then
|
||||||
uci delete wireless.mesh_$apall
|
uci delete wireless.mesh_$apall
|
||||||
uci commit wireless
|
uci commit wireless
|
||||||
|
|
Loading…
Reference in New Issue