procd: service instances can now report an error of why they failed to start.
authorJohn Crispin <john@openwrt.org>
Fri, 6 Jun 2014 09:34:30 +0000 (09:34 +0000)
committerJohn Crispin <john@openwrt.org>
Fri, 6 Jun 2014 09:34:30 +0000 (09:34 +0000)
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 41031

package/system/procd/Makefile
package/system/procd/files/procd.sh

index 4047177378a6081564bab6c0716c5b56a3aa2813..adc8933e0fdc12aedb5598900dd57f0c4e0a0c39 100644 (file)
@@ -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
 
index bee32938377afb171b5375e6c9e8ca9eec6939ee..228652db97e3f1d5a0fb3de6524d3110516da0d7 100644 (file)
@@ -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 ..
 }