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 @@
NOCACHE_PATH=$(dirname "$0")
libnocache="$NOCACHE_PATH/nocache.so"
if [ -n "$LD_PRELOAD" ]; then
export LD_PRELOAD="$libnocache $LD_PRELOAD"
else
export LD_PRELOAD="$libnocache"
export LD_PRELOAD="$libnocache $LD_PRELOAD"
if [ "$1" = "-n" ]; then
export NOCACHE_NR_FADVISE="$2"
shift 2
fi
if [ "$1" = "-n" ]; then
......
#!/bin/sh
libnocache="/usr/local/lib/nocache.so"
#!/bin/sh
BASEDIR="/usr/local"
libnocache="$BASEDIR/lib/nocache.so"
if [ -n "$LD_PRELOAD" ]; then
export LD_PRELOAD="$libnocache $LD_PRELOAD"
else
export LD_PRELOAD="$libnocache"
export LD_PRELOAD="$libnocache $LD_PRELOAD"
if [ "$1" = "-n" ]; then
export NOCACHE_NR_FADVISE="$2"
shift 2
fi
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