mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
gateway-info: Added enable option
This commit is contained in:
parent
0b6e35e36b
commit
4015982a87
5 changed files with 13 additions and 2 deletions
|
|
@ -1,3 +1,4 @@
|
|||
config global 'global'
|
||||
option enable '1'
|
||||
option wan_interface 'wan'
|
||||
option lan_interface 'lan'
|
||||
|
|
|
|||
|
|
@ -268,9 +268,14 @@ configure_gateway_device_info() {
|
|||
lan_intf=""
|
||||
|
||||
config_load gateway
|
||||
config_get_bool enable global enable '1'
|
||||
config_get wan_intf global wan_interface "wan"
|
||||
config_get lan_intf global lan_interface "lan"
|
||||
|
||||
if [ "${enable}" -eq 0 ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Set dhcp_option 125 for device info if not already configured
|
||||
enable_dhcp_option125 "${wan_intf}"
|
||||
|
||||
|
|
|
|||
|
|
@ -280,8 +280,13 @@ send_usp_gw_event() {
|
|||
}
|
||||
|
||||
config_load gateway
|
||||
config_get_bool enable global enable '1'
|
||||
config_get wan_intf global wan_interface "wan"
|
||||
|
||||
if [ "${enable}" -eq 0 ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ "${wan_intf}" == "${INTERFACE}" ]; then
|
||||
if [ "${1}" == "deconfig" ]; then
|
||||
rm -rf /var/state/gwinfo
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ define Package/icwmp/install
|
|||
$(INSTALL_BIN) ./files/etc/uci-defaults/85-cwmp-set-userid $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/95-set-random-inform-time $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/95-migrate-gw-info $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/85-migrate-gw-info $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/icwmpd/vendor_log.sh $(1)/etc/icwmpd/vendor_log.sh
|
||||
$(INSTALL_BIN) ./files/etc/icwmpd/firewall.cwmp $(1)/etc/icwmpd/firewall.cwmp
|
||||
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ fi
|
|||
|
||||
val="$(uci -q get cwmp.cpe.disable_gatewayinfo)"
|
||||
|
||||
if [ "$val" -eq 1 ]; then
|
||||
if [ -n "$val" ] && [ "$val" -eq 1 ]; then
|
||||
uci -q set gateway.global.enable=0
|
||||
fi
|
||||
|
||||
Loading…
Add table
Reference in a new issue