slackbuilds_ponce/network/oidentd/doinst.sh
Mario Preksavec 7149899df2
network/oidentd: Updated for version 2.3.1.
Signed-off-by: Mario Preksavec <mario@slackware.hr>
2018-10-13 08:03:08 +07:00

15 lines
409 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...
}
for i in etc/oidentd{_masq,}.conf.new ; do config $i ; done