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:
parent
5b23cfab73
commit
4cf7929869
1 changed files with 6 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue