From 4cf79298697bb34de1df53ea79535cba5d2c1e99 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Thu, 26 Mar 2015 10:58:17 +0000 Subject: base-files: add a init.d option that will start the syscall tracer Signed-off-by: John Crispin SVN-Revision: 45009 --- package/base-files/files/etc/rc.common | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'package/base-files') diff --git a/package/base-files/files/etc/rc.common b/package/base-files/files/etc/rc.common index 695fc166fb..e0de073733 100755 --- a/package/base-files/files/etc/rc.common +++ b/package/base-files/files/etc/rc.common @@ -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" -- cgit v1.2.3