1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#!/bin/sh
set -e
PRELOAD="/etc/ld.so.preload"
LIBNAME="libsnoopy.so"
[ -n "$SNOOPYDEBUG" ] && set -x
case "$1" in
remove|upgrade|deconfigure)
# remove $LIBNAME from $PRELOAD (if present)
if grep -vqs "/${LIBNAME}$" $PRELOAD ; then
# the file remains non-empty if $LIBNAME is removed
TEMPFILE=`mktemp`
grep -v "/${LIBNAME}$" $PRELOAD > "$TEMPFILE"
mv -f "$TEMPFILE" $PRELOAD
else
rm -f $PRELOAD
fi
;;
failed-upgrade)
;;
*)
echo >&2 "prerm called with unknown argument $1"
;;
esac
#DEBHELPER#
|