diff options
author | Alan Hicks <alan@lizella.net> | 2010-12-06 22:53:21 -0600 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-12-06 23:26:22 -0600 |
commit | 40e678c3aea6d5b3e771dbb5600ce234df729fa7 (patch) | |
tree | 555a68d4542c4c5b9b68917339aee01795b09238 /network/dovecot/doinst.sh | |
parent | 83a396f813793fa2c64237610696144801fa8d38 (diff) | |
download | slackbuilds-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.sh | 20 |
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 |