mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
obuspc: remove usages of netmode
This commit is contained in:
parent
8ed6bd1bfc
commit
cdb76b1c18
3 changed files with 15 additions and 12 deletions
|
|
@ -5,7 +5,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=obuspc
|
||||
PKG_VERSION:=1.0.1.6
|
||||
PKG_VERSION:=1.0.1.7
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
|
|
@ -64,7 +64,6 @@ define Package/obuspc/install
|
|||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/obuspc $(1)/usr/sbin/uspc
|
||||
$(INSTALL_BIN) ./files/etc/init.d/uspc $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/50-disable-on-extender $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/99-fix-agent-endpoint $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/100-add-mosquitto-listener $(1)/etc/uci-defaults/
|
||||
$(INSTALL_DATA) ./files/etc/config/uspc $(1)/etc/config/
|
||||
|
|
|
|||
|
|
@ -329,6 +329,13 @@ boot() {
|
|||
return 0;
|
||||
fi
|
||||
|
||||
# Check if device is an extender nothing to do
|
||||
lan_proto="$(uci -q get network.lan.proto)"
|
||||
if [ "${lan_proto}" == "dhcp" ]; then
|
||||
# extender so return
|
||||
return 0;
|
||||
fi
|
||||
|
||||
configure_dnsmasq_op125 "${interface}"
|
||||
|
||||
start
|
||||
|
|
@ -591,6 +598,13 @@ start_service() {
|
|||
return 0;
|
||||
fi
|
||||
|
||||
# Check if device is an extender then do not start the service
|
||||
lan_proto="$(uci -q get network.lan.proto)"
|
||||
if [ "${lan_proto}" == "dhcp" ]; then
|
||||
# extender so return
|
||||
return 0;
|
||||
fi
|
||||
|
||||
mkdir -p /tmp/usp/
|
||||
db_init
|
||||
register_service
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
mode="$(fw_printenv -n netmode)"
|
||||
if [ "${mode}" == "extender" ]; then
|
||||
uci set uspc.global.enabled=0
|
||||
uci commit uspc
|
||||
fi
|
||||
Loading…
Add table
Reference in a new issue