slackware-current/source/n/iproute2/doinst.sh
Patrick J Volkerding b6b0663c2b Thu Sep 7 19:41:00 UTC 2023
d/rust-bindgen-0.68.1-x86_64-1.txz:  Upgraded.
l/glib2-2.76.5-x86_64-2.txz:  Rebuilt.
  [PATCH] gkeyfile: Temporarily re-allow invalid escapes when parsing strings.
l/netpbm-11.03.05-x86_64-1.txz:  Upgraded.
n/iproute2-6.5.0-x86_64-2.txz:  Rebuilt.
  Fixed build/install script issues due to config files moving from /etc.
2023-09-07 22:01:03 +02:00

14 lines
403 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 file in usr/lib/iproute2/*.new ; do
config $file
done