aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc/rc.common
diff options
context:
space:
mode:
authorRoman Yeryomin <roman@advem.lv>2017-12-14 23:55:08 +0200
committerJohn Crispin <john@phrozen.org>2018-01-02 07:52:57 +0100
commit8b477d09d1af95fd257d70b5329bd64f6f0de05b (patch)
tree1cb404193be315453146caad0595cb6f92e849fc /package/base-files/files/etc/rc.common
parente410f785a4d5676eb71715e8c5c4b3445c6478e3 (diff)
downloadupstream-8b477d09d1af95fd257d70b5329bd64f6f0de05b.tar.gz
upstream-8b477d09d1af95fd257d70b5329bd64f6f0de05b.tar.bz2
upstream-8b477d09d1af95fd257d70b5329bd64f6f0de05b.zip
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>
Diffstat (limited to 'package/base-files/files/etc/rc.common')
-rwxr-xr-xpackage/base-files/files/etc/rc.common2
1 files changed, 2 insertions, 0 deletions
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