summaryrefslogtreecommitdiff
path: root/network/dovecot/doinst.sh
diff options
context:
space:
mode:
authorAlan Hicks <alan@lizella.net>2010-12-06 22:53:21 -0600
committerRobby Workman <rworkman@slackbuilds.org>2010-12-06 23:26:22 -0600
commit40e678c3aea6d5b3e771dbb5600ce234df729fa7 (patch)
tree555a68d4542c4c5b9b68917339aee01795b09238 /network/dovecot/doinst.sh
parent83a396f813793fa2c64237610696144801fa8d38 (diff)
downloadslackbuilds-40e678c3aea6d5b3e771dbb5600ce234df729fa7.tar.gz
network/dovecot: Updated for version 2.0.8.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/dovecot/doinst.sh')
-rw-r--r--network/dovecot/doinst.sh20
1 files changed, 11 insertions, 9 deletions
diff --git a/network/dovecot/doinst.sh b/network/dovecot/doinst.sh
index 088bd4ecc8..f39fc6ebd4 100644
--- a/network/dovecot/doinst.sh
+++ b/network/dovecot/doinst.sh
@@ -10,13 +10,15 @@ config() {
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
-
-# Keep same perms on rc.dovecot.new:
-if [ -e etc/rc.d/rc.dovecot ]; then
- cp -a etc/rc.d/rc.dovecot etc/rc.d/rc.dovecot.new.incoming
- cat etc/rc.d/rc.dovecot.new > etc/rc.d/rc.dovecot.new.incoming
- mv etc/rc.d/rc.dovecot.new.incoming etc/rc.d/rc.dovecot.new
-fi
-
-config etc/rc.d/rc.dovecot.new
+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.dovecot.new