PROCD services can't overwrite those functions defined in the
USE_PROCD body (like stop()), since the initfile is sourced
before.

This change moves the sourcing below and with that allows
PROCD init scripts to overwrite them.

Signed-off-by: Zefir Kurtisi <zefir.kurt...@neratec.com>
---
 package/base-files/files/etc/rc.common | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/base-files/files/etc/rc.common 
b/package/base-files/files/etc/rc.common
index a2ea6a5679..2d89ebe67f 100755
--- a/package/base-files/files/etc/rc.common
+++ b/package/base-files/files/etc/rc.common
@@ -98,8 +98,6 @@ service_running() {
 
 ${INIT_TRACE:+set -x}
 
-. "$initscript"
-
 [ -n "$USE_PROCD" ] && {
        EXTRA_COMMANDS="${EXTRA_COMMANDS} running trace"
 
@@ -143,6 +141,8 @@ ${INIT_TRACE:+set -x}
        }
 }
 
+. "$initscript"
+
 ALL_COMMANDS="start stop reload restart boot shutdown enable disable enabled 
depends ${EXTRA_COMMANDS}"
 list_contains ALL_COMMANDS "$action" || action=help
 $action "$@"
-- 
2.14.1


_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to