aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-03-26 10:58:17 +0000
committerJohn Crispin <john@openwrt.org>2015-03-26 10:58:17 +0000
commit4cf79298697bb34de1df53ea79535cba5d2c1e99 (patch)
tree3d2684f39dd4085a22925f8419a019ec66c61256 /package/base-files/files/etc
parent5b23cfab731174723050706e6ec9fa6bc6a4ca9d (diff)
downloadupstream-4cf79298697bb34de1df53ea79535cba5d2c1e99.tar.gz
upstream-4cf79298697bb34de1df53ea79535cba5d2c1e99.tar.bz2
upstream-4cf79298697bb34de1df53ea79535cba5d2c1e99.zip
base-files: add a init.d option that will start the syscall tracer
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 45009
Diffstat (limited to 'package/base-files/files/etc')
-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"