slackbuilds_ponce/network/rssh/doinst.sh
Michal Bialozor 478a254618 network/rssh: Updated for version 2.3.4.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2013-03-03 01:48:02 -06:00

15 lines
374 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/rssh.conf.new