2010-05-11 22:54:57 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
config() {
|
|
|
|
NEW="$1"
|
|
|
|
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
2012-04-30 02:03:28 +02:00
|
|
|
|
2010-05-11 22:54:57 +02:00
|
|
|
if [ ! -r $OLD ]; then
|
|
|
|
mv $NEW $OLD
|
2012-04-30 02:03:28 +02:00
|
|
|
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
|
2010-05-11 22:54:57 +02:00
|
|
|
rm $NEW
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-04-30 02:03:28 +02:00
|
|
|
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
|
|
|
|
}
|
2010-05-11 22:54:57 +02:00
|
|
|
|
2012-04-30 02:03:28 +02:00
|
|
|
config etc/logrotate.d/murmur.new
|
2010-05-11 22:54:57 +02:00
|
|
|
config etc/murmur.ini.new
|
2012-04-30 02:03:28 +02:00
|
|
|
|
|
|
|
preserve_perms etc/rc.d/rc.murmur.new
|