slackbuilds_ponce/network/reaver/doinst.sh
Marco Bonetti ed86910e6b network/reaver: Added (brute force attack against Wifi Protected Setup)
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
2012-02-11 21:19:29 -06:00

14 lines
380 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/reaver/reaver.db.new