mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
timemngr: Fix ubus cleanup
This commit is contained in:
parent
1d1318dad2
commit
14a32ff704
2 changed files with 8 additions and 5 deletions
|
|
@ -5,13 +5,13 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=timemngr
|
||||
PKG_VERSION:=1.0.4
|
||||
PKG_VERSION:=1.0.5
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/timemngr.git
|
||||
PKG_SOURCE_VERSION:=1ffb220f42e37befb37e40ac2286ba31fddfb157
|
||||
PKG_SOURCE_VERSION:=64994a432a71589e7d24fca8c5d1d9948df4b72a
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -13,16 +13,18 @@ DM_INPUT="/etc/timemngr/input.json"
|
|||
|
||||
validate_global_section() {
|
||||
uci_validate_section time global global \
|
||||
'enable:bool:1'
|
||||
'enable:bool:1' \
|
||||
'loglevel:uinteger:1'
|
||||
}
|
||||
|
||||
start_service() {
|
||||
local enable loglevel
|
||||
|
||||
if uci -q get system.ntp >/dev/null 2>&1; then
|
||||
logger -t timemngr.init "Not starting timemngr, legacy ntp definition detected"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local enable
|
||||
validate_global_section || {
|
||||
return 1
|
||||
}
|
||||
|
|
@ -32,7 +34,8 @@ start_service() {
|
|||
fi
|
||||
|
||||
procd_open_instance timemngr_ubus
|
||||
procd_set_param command $PROG_UBUS -l 1
|
||||
procd_set_param command $PROG_UBUS
|
||||
procd_append_param command -l ${loglevel}
|
||||
procd_close_instance
|
||||
|
||||
generate_config
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue