Commit ff1c52d9 authored by Julius Plenz's avatar Julius Plenz

Merge branch 'behavior_mods' of git://github.com/noushi/nocache

* 'behavior_mods' of git://github.com/noushi/nocache: added -n option to nocache.global added BASEDIR to nocache.global (modifiable by sed) simplified LD_PRELOAD declaration
parents 5ff4aa6b ca7269e5
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
NOCACHE_PATH=$(dirname "$0") NOCACHE_PATH=$(dirname "$0")
libnocache="$NOCACHE_PATH/nocache.so" libnocache="$NOCACHE_PATH/nocache.so"
if [ -n "$LD_PRELOAD" ]; then export LD_PRELOAD="$libnocache $LD_PRELOAD"
export LD_PRELOAD="$libnocache $LD_PRELOAD"
else if [ "$1" = "-n" ]; then
export LD_PRELOAD="$libnocache" export NOCACHE_NR_FADVISE="$2"
shift 2
fi fi
if [ "$1" = "-n" ]; then if [ "$1" = "-n" ]; then
......
#!/bin/sh #!/bin/sh
libnocache="/usr/local/lib/nocache.so" BASEDIR="/usr/local"
libnocache="$BASEDIR/lib/nocache.so"
if [ -n "$LD_PRELOAD" ]; then export LD_PRELOAD="$libnocache $LD_PRELOAD"
export LD_PRELOAD="$libnocache $LD_PRELOAD"
else if [ "$1" = "-n" ]; then
export LD_PRELOAD="$libnocache" export NOCACHE_NR_FADVISE="$2"
shift 2
fi fi
exec "$@" exec "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment