base-files: protect stop and reload actions with procd_lock

Signed-off-by: Roman Yeryomin <roman@advem.lv>
Signed-off-by: Andrejs Hanins <ahanins@gmail.com>
This commit is contained in:
Roman Yeryomin 2017-12-14 23:55:08 +02:00 committed by John Crispin
parent e410f785a4
commit 8b477d09d1

View file

@ -127,12 +127,14 @@ ${INIT_TRACE:+set -x}
} }
stop() { stop() {
procd_lock
stop_service "$@" stop_service "$@"
procd_kill "$(basename ${basescript:-$initscript})" "$1" procd_kill "$(basename ${basescript:-$initscript})" "$1"
} }
reload() { reload() {
if eval "type reload_service" 2>/dev/null >/dev/null; then if eval "type reload_service" 2>/dev/null >/dev/null; then
procd_lock
reload_service "$@" reload_service "$@"
else else
start start