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-a3cf2f4a3e73
master
John Crispin 2015-03-26 10:58:17 +00:00
parent 36d9141412
commit 5cbce8ae8b
1 changed files with 6 additions and 1 deletions

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"