postinst is in chkrootkit 0.50-3.2.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #!/bin/sh
CF=/etc/chkrootkit.conf
set -e
. /usr/share/debconf/confmodule
if [ ! -f $CF ]; then
echo "RUN_DAILY=\"false\"" > $CF
echo "RUN_DAILY_OPTS=\"-q\"" >> $CF
echo "DIFF_MODE=\"false\"" >> $CF
else
if ! egrep -q '\bRUN_DAILY\b' $CF > /dev/null; then
echo "RUN_DAILY=\"false\"" >> $CF
fi
if ! egrep -q '\bRUN_DAILY_OPTS\b' $CF > /dev/null; then
echo "RUN_DAILY_OPTS=\"-q\"" >> $CF
fi
if ! egrep -q '\bDIFF_MODE\b' $CF > /dev/null; then
echo "DIFF_MODE=\"false\"" >> $CF
fi
fi
db_version 2.0
db_get chkrootkit/run_daily
RUN_DAILY="$RET"
db_get chkrootkit/run_daily_opts
RUN_DAILY_OPTS="$RET"
db_get chkrootkit/diff_mode
DIFF_MODE="$RET"
cp -a -f $CF $CF.tmp
sed -e "s,^ *RUN_DAILY=.*,RUN_DAILY=\"$RUN_DAILY\"," \
-e "s,^ *RUN_DAILY_OPTS=.*,RUN_DAILY_OPTS=\"$RUN_DAILY_OPTS\"," \
-e "s,^ *DIFF_MODE=.*,DIFF_MODE=\"$DIFF_MODE\"," \
< $CF > $CF.tmp
mv -f $CF.tmp $CF
exit 0
|