procd: downgrade to 2019-05-30

This commit is contained in:
CN_SZTL 2019-11-30 20:08:27 +08:00
parent 6f2fdac5c7
commit 1c1d0f30d6
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
3 changed files with 9 additions and 42 deletions

View File

@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=procd
PKG_RELEASE:=3
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
PKG_MIRROR_HASH:=5ae16b53f80fd85d367a58da822351d611e9662154b0737ee6ed9531a39f01ce
PKG_SOURCE_DATE:=2019-09-21
PKG_SOURCE_VERSION:=8e9fb51fa66e614620a97d371176610e7e1d0010
PKG_SOURCE_DATE:=2019-05-30
PKG_SOURCE_VERSION:=ade00ca585a49c8478bf60eb24ce385676be37a4
PKG_MIRROR_HASH:=1417727ae6fcda01017e1bec3ec66e3e78116f9343cfe0256e40af54c52f2acc
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0
@ -43,7 +43,7 @@ TARGET_LDFLAGS += -flto
define Package/procd
SECTION:=base
CATEGORY:=Base system
DEPENDS:=+ubusd +ubus +libjson-script +ubox +USE_GLIBC:librt +libubox +libubus +libblobmsg-json +libjson-c
DEPENDS:=+ubusd +ubus +libjson-script +ubox +USE_GLIBC:librt +libubox +libubus
TITLE:=OpenWrt system process manager
USERID:=:dialout=20 :audio=29
endef
@ -58,7 +58,7 @@ endef
define Package/procd-seccomp
SECTION:=base
CATEGORY:=Base system
DEPENDS:=@(arm||armeb||mips||mipsel||i386||powerpc||x86_64) @!TARGET_uml @KERNEL_SECCOMP +libubox +libblobmsg-json
DEPENDS:=@arm||@armeb||@mips||@mipsel||@i386||@powerpc||@x86_64 @!TARGET_uml @KERNEL_SECCOMP +libubox +libblobmsg-json
TITLE:=OpenWrt process seccomp helper + utrace
endef

39
package/system/procd/files/procd.sh Executable file → Normal file
View File

@ -49,14 +49,6 @@ procd_lock() {
local basescript=$(readlink "$initscript")
local service_name="$(basename ${basescript:-$initscript})"
flock -n 1000 &> /dev/null
if [ "$?" != "0" ]; then
exec 1000>"$IPKG_INSTROOT/var/lock/procd_${service_name}.lock"
flock 1000
if [ "$?" != "0" ]; then
logger "warning: procd flock for $service_name failed"
fi
fi
}
_procd_call() {
@ -407,12 +399,12 @@ _procd_add_instance() {
procd_running() {
local service="$1"
local instance="${2:-*}"
[ "$instance" = "*" ] || instance="'$instance'"
local instance="${2:-instance1}"
local running
json_init
json_add_string name "$service"
local running=$(_procd_ubus_call list | jsonfilter -l 1 -e "@['$service'].instances[$instance].running")
running=$(_procd_ubus_call list | jsonfilter -e "@.$service.instances.${instance}.running")
[ "$running" = "true" ]
}
@ -443,31 +435,6 @@ _procd_send_signal() {
_procd_ubus_call signal
}
_procd_status() {
local service="$1"
local instance="$2"
local data
json_init
[ -n "$service" ] && json_add_string name "$service"
data=$(_procd_ubus_call list | jsonfilter -e '@["'"$service"'"]')
[ -z "$data" ] && { echo "inactive"; return 3; }
data=$(echo "$data" | jsonfilter -e '$.instances')
if [ -z "$data" ]; then
[ -z "$instance" ] && { echo "active with no instances"; return 0; }
data="[]"
fi
[ -n "$instance" ] && instance="\"$instance\"" || instance='*'
if [ -z "$(echo "$data" | jsonfilter -e '$['"$instance"']')" ]; then
echo "unknown instance $instance"; return 4
else
echo "running"; return 0
fi
}
procd_open_data() {
local name="$1"
json_set_namespace procd __procd_old_cb

0
package/system/procd/files/reload_config Executable file → Normal file
View File