Message ID | 20171214215508.4880-1-roman@advem.lv |
---|---|
State | Accepted |
Delegated to: | John Crispin |
Headers | show |
Series | protect init scripts from races | expand |
diff --git a/package/base-files/files/etc/rc.common b/package/base-files/files/etc/rc.common index a2ea6a5679..89ad187c3c 100755 --- a/package/base-files/files/etc/rc.common +++ b/package/base-files/files/etc/rc.common @@ -126,12 +126,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