aboutsummaryrefslogtreecommitdiff
path: root/network/amavisd-new/doinst.sh
diff options
context:
space:
mode:
authorNishant Limbachia <nishant@mnspace.net>2012-06-02 19:50:58 -0400
committerErik Hanson <erik@slackbuilds.org>2012-06-03 15:21:14 -0500
commit3bf00bd0e2039b2e3e7b58e8bc3ade47be0ea2bf (patch)
tree9b722f1724d24bdf7ae9a35b6aa907ca75203edc /network/amavisd-new/doinst.sh
parent5aa4cfd3470f9bf2abfa24df63c68b095f7c2e83 (diff)
network/amavisd-new: Updated for version 2.7.1.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'network/amavisd-new/doinst.sh')
-rw-r--r--network/amavisd-new/doinst.sh22
1 files changed, 13 insertions, 9 deletions
diff --git a/network/amavisd-new/doinst.sh b/network/amavisd-new/doinst.sh
index 637ab6bc82604..ad648167ec14e 100644
--- a/network/amavisd-new/doinst.sh
+++ b/network/amavisd-new/doinst.sh
@@ -11,13 +11,17 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-# Keep same perms on rc.amavisd.new:
-if [ -e etc/rc.d/rc.amavisd-new ]; then
- cp -a etc/rc.d/rc.amavisd-new etc/rc.d/rc.amavisd-new.new.incoming
- cat etc/rc.d/rc.amavisd-new.new > etc/rc.d/rc.amavisd-new.new.incoming
- mv etc/rc.d/rc.amavisd-new.new.incoming etc/rc.d/rc.amavisd-new.new
-fi
+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
+}
-config etc/rc.d/rc.amavisd-new.new
-config etc/amavisd.conf.new
-config etc/logrotate.d/amavisd-new.new
+preserve_perms etc/rc.d/rc.amavisd-new.new
+preserve_perms etc/amavisd.conf.new
+preserve_perms etc/logrotate.d/amavisd-new.new