aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-03-26 10:58:17 +0000
committerJohn Crispin <blogic@openwrt.org>2015-03-26 10:58:17 +0000
commit5cbce8ae8b46f98d6dd27297fc5fcdd32f683b03 (patch)
treeb2548fd504a8486fc9fdd35298f66d8e855b8a8e /package/base-files
parent36d91414120eab2273cc5f0a9274b25d7a93da11 (diff)
downloadupstream-5cbce8ae8b46f98d6dd27297fc5fcdd32f683b03.tar.gz
upstream-5cbce8ae8b46f98d6dd27297fc5fcdd32f683b03.tar.bz2
upstream-5cbce8ae8b46f98d6dd27297fc5fcdd32f683b03.zip
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
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/etc/rc.common7
1 files changed, 6 insertions, 1 deletions
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"