Author: blogic Date: 2014-06-06 11:34:30 +0200 (Fri, 06 Jun 2014) New Revision: 41031
Modified: trunk/package/system/procd/Makefile trunk/package/system/procd/files/procd.sh Log: procd: service instances can now report an error of why they failed to start. Signed-off-by: John Crispin <[email protected]> Modified: trunk/package/system/procd/Makefile =================================================================== --- trunk/package/system/procd/Makefile 2014-06-06 09:20:15 UTC (rev 41030) +++ trunk/package/system/procd/Makefile 2014-06-06 09:34:30 UTC (rev 41031) @@ -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 Modified: trunk/package/system/procd/files/procd.sh =================================================================== --- trunk/package/system/procd/files/procd.sh 2014-06-06 09:20:15 UTC (rev 41030) +++ trunk/package/system/procd/files/procd.sh 2014-06-06 09:34:30 UTC (rev 41031) @@ -131,6 +131,11 @@ 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_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 @@ command|netdev|file|respawn|watch) _procd_add_array_data "$@" ;; + error) + json_add_string "" "$@" + ;; esac json_select .. } _______________________________________________ openwrt-commits mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits
