aboutsummaryrefslogtreecommitdiffstats
path: root/package/system
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-06-06 09:34:30 +0000
committerJohn Crispin <blogic@openwrt.org>2014-06-06 09:34:30 +0000
commit16eceec6c4c2a2ab621615e2de46a80117f572f3 (patch)
treea58bbc723d5474a9051aa32edc9338bf188127e6 /package/system
parent9eb585ddab591e329260266a497be55eddbc4b6a (diff)
downloadupstream-16eceec6c4c2a2ab621615e2de46a80117f572f3.tar.gz
upstream-16eceec6c4c2a2ab621615e2de46a80117f572f3.tar.bz2
upstream-16eceec6c4c2a2ab621615e2de46a80117f572f3.zip
procd: service instances can now report an error of why they failed to start.
Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41031 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/system')
-rw-r--r--package/system/procd/Makefile4
-rw-r--r--package/system/procd/files/procd.sh13
2 files changed, 15 insertions, 2 deletions
diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index 4047177378..adc8933e0f 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -1,14 +1,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=procd
-PKG_VERSION:=2014-06-05
+PKG_VERSION:=2014-06-06
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:=45ca87272954f46eb6d55365d5a2fbe3520d66ce
+PKG_SOURCE_VERSION:=53c1ea6b9ade10eff3cec07519db862b365a4233
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 bee3293837..228652db97 100644
--- a/package/system/procd/files/procd.sh
+++ b/package/system/procd/files/procd.sh
@@ -131,6 +131,11 @@ _procd_set_param() {
command|netdev|file|respawn|watch)
_procd_add_array "$type" "$@"
;;
+ error)
+ json_add_array "$type"
+ json_add_string "" "$@"
+ json_close_array
+ ;;
nice)
json_add_int "$type" "$1"
;;
@@ -207,8 +212,13 @@ _procd_add_validation() {
_procd_append_param() {
local type="$1"; shift
+ local _json_no_warning=1
json_select "$type"
+ [ $? = 0 ] || {
+ _procd_set_param "$type" "$@"
+ return
+ }
case "$type" in
env|data|limits)
_procd_add_table_data "$@"
@@ -216,6 +226,9 @@ _procd_append_param() {
command|netdev|file|respawn|watch)
_procd_add_array_data "$@"
;;
+ error)
+ json_add_string "" "$@"
+ ;;
esac
json_select ..
}