aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/ubox
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-03-12 19:33:18 +0000
committerJohn Crispin <blogic@openwrt.org>2014-03-12 19:33:18 +0000
commit9ed8fd234824ccb9afa11d1c981412fd82c08f2b (patch)
tree04ec4ddb359eb898dde6968b9a8bf8e72db415b3 /package/system/ubox
parentbd37e9e0ae32d4ddc82d18b1feee6490a3d0bc39 (diff)
downloadmaster-187ad058-9ed8fd234824ccb9afa11d1c981412fd82c08f2b.tar.gz
master-187ad058-9ed8fd234824ccb9afa11d1c981412fd82c08f2b.tar.bz2
master-187ad058-9ed8fd234824ccb9afa11d1c981412fd82c08f2b.zip
ubox: update to latest git head
use the fd handover api of ubus to transfer log data the uci option log_buffer_size can be used to override the default size of 16k Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39898 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/system/ubox')
-rw-r--r--package/system/ubox/Makefile4
-rw-r--r--package/system/ubox/files/log.init26
2 files changed, 22 insertions, 8 deletions
diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile
index 5bd7246858..08da9d0dda 100644
--- a/package/system/ubox/Makefile
+++ b/package/system/ubox/Makefile
@@ -1,13 +1,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ubox
-PKG_VERSION:=2014-01-29
+PKG_VERSION:=2014-03-12
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://nbd.name/luci2/ubox.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=71ea854364833c5dcb0800e092b45fed2c45910e
+PKG_SOURCE_VERSION:=c8d14b9b5d0fa3a3f99df386b67670e083c82095
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
CMAKE_INSTALL:=1
diff --git a/package/system/ubox/files/log.init b/package/system/ubox/files/log.init
index bc8c4ed958..ca29fd882c 100644
--- a/package/system/ubox/files/log.init
+++ b/package/system/ubox/files/log.init
@@ -21,6 +21,24 @@ validate_log_section()
return $?
}
+validate_log_daemon()
+{
+ uci_validate_section system system "${1}" \
+ 'log_buffer_size:uinteger:16'
+ return $?
+}
+
+start_service_daemon()
+{
+ local log_buffer_size
+ validate_log_daemon "${1}"
+ procd_open_instance
+ procd_set_param command "/sbin/logd"
+ procd_append_param command -S "${log_buffer_size}"
+ procd_set_param respawn
+ procd_close_instance
+}
+
start_service_file()
{
PIDCOUNT="$(( ${PIDCOUNT} + 1))"
@@ -54,7 +72,7 @@ start_service_remote()
procd_open_instance
procd_set_param command "$PROG" -f -r "$log_ip" "${log_port}" -p "$pid_file"
[ "${log_proto}" != "udp" ] || procd_append_param command -u
- [ -z "${log_prefix}" ] || procd_append_param command -P ${log_prefix}
+ [ -z "${log_prefix}" ] || procd_append_param command -P "${log_prefix}"
procd_close_instance
}
@@ -66,12 +84,8 @@ service_triggers()
start_service()
{
- procd_open_instance
- procd_set_param command "/sbin/logd"
- procd_set_param respawn
- procd_close_instance
-
config_load system
+ config_foreach start_service_daemon system
config_foreach start_service_file system
config_foreach start_service_remote system
}