base-files: add a init.d option that will start the syscall tracer

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45009
This commit is contained in:
John Crispin 2015-03-26 10:58:17 +00:00
parent 5b23cfab73
commit 4cf7929869

View File

@ -97,7 +97,7 @@ ${INIT_TRACE:+set -x}
. "$initscript"
[ -n "$USE_PROCD" ] && {
EXTRA_COMMANDS="${EXTRA_COMMANDS} running"
EXTRA_COMMANDS="${EXTRA_COMMANDS} running trace"
. $IPKG_INSTROOT/lib/functions/procd.sh
basescript=$(readlink "$initscript")
@ -114,6 +114,11 @@ ${INIT_TRACE:+set -x}
fi
}
trace() {
TRACE_SYSCALLS=1
start "$@"
}
stop() {
stop_service "$@"
procd_kill "$(basename ${basescript:-$initscript})" "$1"