[source] base-files: protect stop and reload actions with procd_lock

LEDE Commits lede-commits at lists.infradead.org
Tue Jan 2 05:29:24 PST 2018


blogic pushed a commit to source.git, branch master:
https://git.lede-project.org/8b477d09d1af95fd257d70b5329bd64f6f0de05b

commit 8b477d09d1af95fd257d70b5329bd64f6f0de05b
Author: Roman Yeryomin <roman at advem.lv>
AuthorDate: Thu Dec 14 23:55:08 2017 +0200

    base-files: protect stop and reload actions with procd_lock
    
    Signed-off-by: Roman Yeryomin <roman at advem.lv>
    Signed-off-by: Andrejs Hanins <ahanins at gmail.com>
---
 package/base-files/files/etc/rc.common | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/base-files/files/etc/rc.common b/package/base-files/files/etc/rc.common
index a08c1f8..3e23717 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



More information about the lede-commits mailing list