diff options
author | John Crispin <john@openwrt.org> | 2014-01-19 19:10:09 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2014-01-19 19:10:09 +0000 |
commit | 1de0eac947c63a71b1b56ff5f7ab8e140650baba (patch) | |
tree | 7846b0c99ef9b069cd636921bf3577484a6f8c82 /package/system/ubox/files/log.init | |
parent | fac5e62abdec3cb5370bd09fdb704052001c3f30 (diff) | |
download | master-31e0f0ae-1de0eac947c63a71b1b56ff5f7ab8e140650baba.tar.gz master-31e0f0ae-1de0eac947c63a71b1b56ff5f7ab8e140650baba.tar.bz2 master-31e0f0ae-1de0eac947c63a71b1b56ff5f7ab8e140650baba.zip |
ubox: update to latest git head
adds option to set internal buffer size
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 39333
Diffstat (limited to 'package/system/ubox/files/log.init')
-rw-r--r-- | package/system/ubox/files/log.init | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/package/system/ubox/files/log.init b/package/system/ubox/files/log.init index 548f9632bf..a00f73de10 100644 --- a/package/system/ubox/files/log.init +++ b/package/system/ubox/files/log.init @@ -21,6 +21,29 @@ validate_log_section() return $? } +validate_log_daemon() +{ + uci_validate_section system system "${1}" \ + 'log_size:uinteger' + return $? +} + +start_service_daemon() +{ + local log_size + + validate_log_daemon "${1}" || { + echo "validation failed" + return 1 + } + + procd_open_instance + procd_set_param command "/sbin/logd" + [ -n "${log_size}" ] && procd_append_param command -S "$log_size" + procd_set_param respawn + procd_close_instance +} + start_service_file() { PIDCOUNT="$(( ${PIDCOUNT} + 1))" @@ -66,12 +89,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 } |