base-files: add a init.d option that will start the syscall tracer
Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45009 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
36d9141412
commit
5cbce8ae8b
|
@ -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 New Issue