mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 13:48:06 +00:00
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
@ -97,7 +97,7 @@ ${INIT_TRACE:+set -x}
|
|||||||
. "$initscript"
|
. "$initscript"
|
||||||
|
|
||||||
[ -n "$USE_PROCD" ] && {
|
[ -n "$USE_PROCD" ] && {
|
||||||
EXTRA_COMMANDS="${EXTRA_COMMANDS} running"
|
EXTRA_COMMANDS="${EXTRA_COMMANDS} running trace"
|
||||||
|
|
||||||
. $IPKG_INSTROOT/lib/functions/procd.sh
|
. $IPKG_INSTROOT/lib/functions/procd.sh
|
||||||
basescript=$(readlink "$initscript")
|
basescript=$(readlink "$initscript")
|
||||||
@ -114,6 +114,11 @@ ${INIT_TRACE:+set -x}
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
trace() {
|
||||||
|
TRACE_SYSCALLS=1
|
||||||
|
start "$@"
|
||||||
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
stop_service "$@"
|
stop_service "$@"
|
||||||
procd_kill "$(basename ${basescript:-$initscript})" "$1"
|
procd_kill "$(basename ${basescript:-$initscript})" "$1"
|
||||||
|
Loading…
Reference in New Issue
Block a user