Skip to content

Commit

Permalink
procd: do not overwrite service data by default
Browse files Browse the repository at this point in the history
Allows a running servie to manage its own data if untouched by the init script

Signed-off-by: Felix Fietkau <[email protected]>
  • Loading branch information
nbd168 committed Dec 17, 2024
1 parent 3d900bd commit 8c5826b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 0 additions & 4 deletions package/base-files/files/etc/rc.common
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ service_triggers() {
return 0
}

service_data() {
return 0
}

service_running() {
local instance="${1:-*}"

Expand Down
8 changes: 5 additions & 3 deletions package/system/procd/files/procd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}

Expand Down

0 comments on commit 8c5826b

Please sign in to comment.