slackbuilds_ponce/network/kismet/doinst.sh
Audrius Kažukauskas 66ad06bd2f network/kismet: Added (NIDS tool)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2010-06-29 20:35:12 -05:00

12 lines
344 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...
}