mirror of
git://slackware.nl/current.git
synced 2024-12-29 10:25:00 +01:00
0be77b20da
a/lrzip-0.641-x86_64-1.txz: Upgraded. This update fixes the poor compression ratio reported by Toutatis. a/smartmontools-7.2-x86_64-4.txz: Rebuilt. Add support for /etc/default/smartd. Thanks to upnort. a/sysvinit-2.99-x86_64-1.txz: Upgraded. l/iso-codes-4.6.0-noarch-1.txz: Upgraded. n/ca-certificates-20210308-noarch-1.txz: Upgraded. This update provides the latest CA certificates to check for the authenticity of SSL connections. n/fetchmail-6.4.17-x86_64-1.txz: Upgraded. xfce/thunar-4.16.5-x86_64-1.txz: Upgraded.
26 lines
669 B
Bash
26 lines
669 B
Bash
#!/bin/sh
|
|
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...
|
|
}
|
|
preserve_perms() {
|
|
NEW="$1"
|
|
OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
|
|
if [ -e ${OLD} ]; then
|
|
cp -a ${OLD} ${NEW}.incoming
|
|
cat ${NEW} > ${NEW}.incoming
|
|
mv ${NEW}.incoming ${NEW}
|
|
fi
|
|
config ${NEW}
|
|
}
|
|
|
|
preserve_perms etc/rc.d/rc.smartd.new
|
|
config etc/smartd.conf.new
|
|
config etc/default/smartd.new
|