slackbuilds_ponce/system/rkhunter/doinst.sh
Robby Workman 1cc9f1aa76 system/rkhunter: Updated for version 1.3.8.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2011-03-31 16:06:33 -05:00

13 lines
376 B
Bash

config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
# toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
config etc/rkhunter.conf.new