aboutsummaryrefslogtreecommitdiff
path: root/network/spamassassin/doinst.sh
diff options
context:
space:
mode:
authorLukenShiro <lukenshiro@ngi.it>2011-08-10 10:46:41 -0300
committerNiels Horn <niels.horn@slackbuilds.org>2011-08-10 10:46:41 -0300
commit89ec349ce612284f8d6ce74b837a14b96e61966b (patch)
tree6bd64a8cbcb7eebf79e0fbebb2e5c3027c0693a7 /network/spamassassin/doinst.sh
parent17a576d2275472fe25361999255ee2c916040b5a (diff)
network/spamassassin: Updated for version 3.3.2.
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'network/spamassassin/doinst.sh')
-rw-r--r--network/spamassassin/doinst.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/network/spamassassin/doinst.sh b/network/spamassassin/doinst.sh
index 0f1a4cd01e70f..e18d25482e732 100644
--- a/network/spamassassin/doinst.sh
+++ b/network/spamassassin/doinst.sh
@@ -11,22 +11,22 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-# Keep same permissions on rc.spamd.new as an existing rc.spamd:
-if [ -e etc/rc.d/rc.spamd ]; then
- cp -a etc/rc.d/rc.spamd etc/rc.d/rc.spamd.new.incoming
- cat etc/rc.d/rc.spamd.new > etc/rc.d/rc.spamd.new.incoming
- mv etc/rc.d/rc.spamd.new.incoming etc/rc.d/rc.spamd.new
-else
- # If rc.spamd does not exist, make the new one executable by default,
- # which won't matter unless it's called from rc.local anyway
- chmod 0755 etc/rc.d/rc.spamd.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
+}
+preserve_perms etc/rc.d/rc.spamd.new
config etc/mail/spamassassin/init.pre.new
config etc/mail/spamassassin/local.cf.new
config etc/mail/spamassassin/v310.pre.new
config etc/mail/spamassassin/v312.pre.new
config etc/mail/spamassassin/v320.pre.new
config etc/mail/spamassassin/v330.pre.new
-config etc/rc.d/rc.spamd.new
config etc/spamassassin.conf.new