aboutsummaryrefslogtreecommitdiff
path: root/network/mailman/doinst.sh
diff options
context:
space:
mode:
authorEugene Suter <easuter@gmail.com>2010-05-13 01:00:06 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 01:00:06 +0200
commit5d39057ea14c5f0b2100497e308496ce7eac7dcb (patch)
tree2412ae9375e919973a599ac467492d5a1d2e3b49 /network/mailman/doinst.sh
parent76d02d3f8a741a6aab380e128d211b0727004918 (diff)
network/mailman: Added to 13.0 repository
Diffstat (limited to 'network/mailman/doinst.sh')
-rw-r--r--network/mailman/doinst.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/network/mailman/doinst.sh b/network/mailman/doinst.sh
new file mode 100644
index 0000000000000..0705113e98c74
--- /dev/null
+++ b/network/mailman/doinst.sh
@@ -0,0 +1,26 @@
+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.mailman.new
+