From: Roman Yeryomin Date: Thu, 14 Dec 2017 21:55:08 +0000 (+0200) Subject: base-files: protect stop and reload actions with procd_lock X-Git-Tag: v18.06.0-rc1~1432 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8b477d09d1af95fd257d70b5329bd64f6f0de05b;p=oweals%2Fopenwrt.git base-files: protect stop and reload actions with procd_lock Signed-off-by: Roman Yeryomin Signed-off-by: Andrejs Hanins --- diff --git a/package/base-files/files/etc/rc.common b/package/base-files/files/etc/rc.common index a08c1f8f48..3e237170b4 100755 --- a/package/base-files/files/etc/rc.common +++ b/package/base-files/files/etc/rc.common @@ -127,12 +127,14 @@ ${INIT_TRACE:+set -x} } stop() { + procd_lock stop_service "$@" procd_kill "$(basename ${basescript:-$initscript})" "$1" } reload() { if eval "type reload_service" 2>/dev/null >/dev/null; then + procd_lock reload_service "$@" else start