procd: Allow initscripts to start one daemon instance at a time

Signed-off-by: Pierre Lebleu <pierre.lebleu@technicolor.com>
This commit is contained in:
Pierre Lebleu 2016-10-13 12:52:05 +02:00 committed by John Crispin
parent 5c96200dab
commit 6bb11d52f3
2 changed files with 4 additions and 2 deletions

View file

@ -102,9 +102,11 @@ ${INIT_TRACE:+set -x}
. $IPKG_INSTROOT/lib/functions/procd.sh . $IPKG_INSTROOT/lib/functions/procd.sh
basescript=$(readlink "$initscript") basescript=$(readlink "$initscript")
rc_procd() { rc_procd() {
local method="set"
[ -n "$2" ] && method="add"
procd_open_service "$(basename ${basescript:-$initscript})" "$initscript" procd_open_service "$(basename ${basescript:-$initscript})" "$initscript"
"$@" "$@"
procd_close_service procd_close_service "$method"
} }
start() { start() {

View file

@ -76,7 +76,7 @@ _procd_close_service() {
_procd_open_trigger _procd_open_trigger
service_triggers service_triggers
_procd_close_trigger _procd_close_trigger
_procd_ubus_call set _procd_ubus_call ${1:-set}
} }
_procd_add_array_data() { _procd_add_array_data() {