summaryrefslogtreecommitdiff
path: root/package/system/procd
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-08-29 18:16:24 +0000
committerJohn Crispin <john@openwrt.org>2014-08-29 18:16:24 +0000
commitb0d9dcf84dd0516fd9ef58cf1a7d93536d4afb7c (patch)
treec7f5bab61065cf10ccb56d43c4c0b4af1028e742 /package/system/procd
parent607f00d273ba8ae8bfdf798e3c347851adc0725f (diff)
downloadmtk-20170518-b0d9dcf84dd0516fd9ef58cf1a7d93536d4afb7c.zip
mtk-20170518-b0d9dcf84dd0516fd9ef58cf1a7d93536d4afb7c.tar.gz
mtk-20170518-b0d9dcf84dd0516fd9ef58cf1a7d93536d4afb7c.tar.bz2
procd: update to latest git HEAD
this adds a interafce.update trigger and mdns service registration helpers Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 42324
Diffstat (limited to 'package/system/procd')
-rw-r--r--package/system/procd/Makefile4
-rw-r--r--package/system/procd/files/procd.sh44
2 files changed, 46 insertions, 2 deletions
diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index 840778a..1f4d7d0 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -8,14 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=procd
-PKG_VERSION:=2014-07-30
+PKG_VERSION:=2014-08-29
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://nbd.name/luci2/procd.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=35e01a9601292b2f609e65c2ddb3990cba8f378e
+PKG_SOURCE_VERSION:=6a6fa0a6067cb3c522f5dc735e808a68f62b30b2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
CMAKE_INSTALL:=1
diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh
index 1b19ba9..a92d365 100644
--- a/package/system/procd/files/procd.sh
+++ b/package/system/procd/files/procd.sh
@@ -195,6 +195,24 @@ _procd_add_config_trigger() {
json_close_array
}
+_procd_add_raw_trigger() {
+ json_add_array
+ _procd_add_array_data "$1"
+ shift
+ local timeout=$1
+ shift
+
+ json_add_array
+ json_add_array
+ _procd_add_array_data "run_script" "$@"
+ json_close_array
+ json_close_array
+
+ json_add_int "" "$timeout"
+
+ json_close_array
+}
+
_procd_add_reload_trigger() {
local script=$(readlink "$initscript")
local name=$(basename ${script:-$initscript})
@@ -287,6 +305,30 @@ _procd_set_config_changed() {
ubus call service event "$(json_dump)"
}
+procd_add_mdns_service() {
+ local service proto port
+ service=$1; shift
+ proto=$1; shift
+ port=$1; shift
+ json_add_object "${service}_$port"
+ json_add_string "service" "_$service._$proto.local"
+ json_add_int port "$port"
+ [ -n "$1" ] && {
+ json_add_array txt
+ for txt in $@; do json_add_string "" $txt; done
+ json_select ..
+ }
+ json_select ..
+}
+
+_procd_add_mdns() {
+ procd_open_data
+ json_add_object "mdns"
+ mdns_add_service $@
+ json_close_object
+ procd_close_data
+}
+
uci_validate_section()
{
local _package="$1"
@@ -306,6 +348,7 @@ _procd_wrapper \
procd_open_service \
procd_close_service \
procd_add_instance \
+ procd_add_raw_trigger \
procd_add_config_trigger \
procd_add_interface_trigger \
procd_add_reload_trigger \
@@ -321,4 +364,5 @@ _procd_wrapper \
procd_append_param \
procd_add_validation \
procd_set_config_changed \
+ procd_add_mdns \
procd_kill