From: John Crispin Date: Thu, 26 Mar 2015 10:58:17 +0000 (+0000) Subject: base-files: add a init.d option that will start the syscall tracer X-Git-Tag: reboot~3728 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4cf79298697bb34de1df53ea79535cba5d2c1e99;p=openwrt%2Fstaging%2Fblogic.git base-files: add a init.d option that will start the syscall tracer Signed-off-by: John Crispin SVN-Revision: 45009 --- diff --git a/package/base-files/files/etc/rc.common b/package/base-files/files/etc/rc.common index 695fc166fbcd..e0de0737331c 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"