Commit ca7269e5 authored by Reda NOUSHI's avatar Reda NOUSHI

added -n option to nocache.global

added BASEDIR to nocache.global (modifiable by sed) simplified LD_PRELOAD declaration
parent e8be1919
......@@ -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
exec "$@"
#!/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