rpcd: update to latest Git head
authorJo-Philipp Wich <jo@mein.io>
Thu, 22 Nov 2018 13:42:14 +0000 (14:42 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 12 Dec 2018 15:35:55 +0000 (16:35 +0100)
3aa81d0 file: access exec timeout via daemon ops structure
7235f34 plugin: store pointer to exec timeout value in the ops structure
ccd7c0a treewide: rename exec_timeout to rpc_exec_timeout
c79ef22 main: fix logic bug when not specifying a timeout option
2cc4b99 file: use global exec timeout instead of own hardcoded limit
ecd1660 exec: increase maximum execution time to 120s

Also expose the socket and timeout options in /etc/config/rpcd for
easier use.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commits 41055551151e12abf8efe710efa4dc025a7b7b6a,
 952b11766cd83898cf8f9626b75141eac6d4ad1a and
 e533fb17061027dca2cc60a9555fc2edb9e832eb)

package/system/rpcd/Makefile
package/system/rpcd/files/rpcd.config
package/system/rpcd/files/rpcd.init

index fee2c5b33d3e8b7f5f7e0469a318db60850e56cf..14cbdaf9c6b40eee9fb1879c9be0deaf986cf32c 100644 (file)
@@ -12,10 +12,10 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git
-PKG_SOURCE_DATE:=2018-08-16
-PKG_SOURCE_VERSION:=41333abee4c57e3de2bcfa08972954e2af20705a
+PKG_SOURCE_DATE:=2018-11-28
+PKG_SOURCE_VERSION:=3aa81d0dfae167eccc26203bd0c96f3e3450f253
 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
-PKG_MIRROR_HASH:=a6d3c2228836a738919dfbd57a9e3ae5d427d5f94607b7e78b92b03f09f59731
+PKG_MIRROR_HASH:=1befc5e1793a687e7a37b4f4d611e5f95aef4b79ad4b288c4dcb4c74d212509b
 
 PKG_LICENSE:=ISC
 PKG_LICENSE_FILES:=
index 499ea276287efdb84fb63840c4299c5655a4c1ba..faaed7f538d090a43b8380e27ecda128c0025e85 100644 (file)
@@ -1,3 +1,6 @@
+config rpcd
+       option socket /var/run/ubus.sock
+       option timeout 30
 
 config login
        option username 'root'
index 98b633365b8147384c27e18dbaf9750805ca99d2..0a37ee19f925b12d0fb805a079aee974a9ad81be 100755 (executable)
@@ -7,8 +7,11 @@ NAME=rpcd
 PROG=/sbin/rpcd
 
 start_service() {
+       local socket=$(uci -q get rpcd.@rpcd[0].socket)
+       local timeout=$(uci -q get rpcd.@rpcd[0].timeout)
+
        procd_open_instance
-       procd_set_param command "$PROG"
+       procd_set_param command "$PROG" ${socket:+-s "$socket"} ${timeout:+-t "$timeout"}
        procd_close_instance
 }