diff options
| author | Joseph Henry <josephjah@gmail.com> | 2015-11-17 02:28:23 -0800 |
|---|---|---|
| committer | Joseph Henry <josephjah@gmail.com> | 2015-11-17 02:28:23 -0800 |
| commit | a660ec490e8934b36f54822ae762f71ece4ca9a7 (patch) | |
| tree | 6b35669320c2673dc7c354559da6b7fb2a4fdb51 /docker-test/throughput_httpd_2.4.6/intercept | |
| parent | f5c2600ca4898630b1f3ecfd2b8b28876bee187f (diff) | |
| download | infinitytier-a660ec490e8934b36f54822ae762f71ece4ca9a7.tar.gz infinitytier-a660ec490e8934b36f54822ae762f71ece4ca9a7.zip | |
Started work on automated unit test scripts
Diffstat (limited to 'docker-test/throughput_httpd_2.4.6/intercept')
| -rwxr-xr-x | docker-test/throughput_httpd_2.4.6/intercept | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/docker-test/throughput_httpd_2.4.6/intercept b/docker-test/throughput_httpd_2.4.6/intercept new file mode 100755 index 00000000..3eb27ff7 --- /dev/null +++ b/docker-test/throughput_httpd_2.4.6/intercept @@ -0,0 +1,54 @@ +#!/bin/sh +# usage: +# /usr/bin/intercept program <args> + +if [ $# = 0 ] ; then + echo "$0: insufficient arguments" + exit +fi + +case "$1" in + on) + if [ -z "$LD_PRELOAD" ] + then + export LD_PRELOAD="/lib/libintercept.so.1.0" + else + echo $LD_PRELOAD | grep -q "/lib/libintercept\.so.1.0" || \ + export LD_PRELOAD="/lib/libintercept.so $LD_PRELOAD" + fi + ;; + off) + export LD_PRELOAD=`echo -n $LD_PRELOAD | sed 's/\/lib\/libintercept.so.1.0 \?//'` + if [ -z "$LD_PRELOAD" ] + then + unset LD_PRELOAD + fi + ;; + show|sh) + echo "LD_PRELOAD=\"$LD_PRELOAD\"" + ;; + -h|-?) + echo "" + ;; + *) + if [ -z "$LD_PRELOAD" ] + then + export LD_PRELOAD="/lib/libintercept.so.1.0" + else + echo $LD_PRELOAD | grep -q "/lib/libintercept\.so.1.0" || \ + export LD_PRELOAD="/lib/libintercept.so.1.0 $LD_PRELOAD" + fi + + if [ $# = 0 ] + then + ${SHELL:-/bin/sh} + fi + + if [ $# -gt 0 ] + then + exec "$@" + fi + ;; +esac + +#EOF |
