From: Felix Fietkau Date: Tue, 17 Dec 2024 20:21:37 +0000 (+0100) Subject: procd: do not overwrite service data by default X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8c5826b140b6288b9270d232ecda0d540e380d4e;p=openwrt%2Fstaging%2Fwigyori.git procd: do not overwrite service data by default Allows a running servie to manage its own data if untouched by the init script Signed-off-by: Felix Fietkau --- diff --git a/package/base-files/files/etc/rc.common b/package/base-files/files/etc/rc.common index d747303844..abf72ea337 100755 --- a/package/base-files/files/etc/rc.common +++ b/package/base-files/files/etc/rc.common @@ -100,10 +100,6 @@ service_triggers() { return 0 } -service_data() { - return 0 -} - service_running() { local instance="${1:-*}" diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index 5dc8ec42b7..59e002036d 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -101,9 +101,11 @@ _procd_close_service() { _procd_open_trigger service_triggers _procd_close_trigger - _procd_open_data - service_data - _procd_close_data + type service_data >/dev/null 2>&1 && { + _procd_open_data + service_data + _procd_close_data + } _procd_ubus_call ${1:-set} }