diff options
author | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-05-15 13:33:48 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-05-15 22:31:26 +0700 |
commit | 2f376959a7f323d848e31888fff6d4fad4a8b4a3 (patch) | |
tree | 3037981f833f03d45d72fc88c20a5eb63f732870 /network/postfix/doinst.sh | |
parent | ddbf14d3ee1321e479e821667df3afaf0c8dc7e0 (diff) | |
download | slackbuilds-2f376959a7f323d848e31888fff6d4fad4a8b4a3.tar.gz |
network/postfix: Fix permission.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/postfix/doinst.sh')
-rw-r--r-- | network/postfix/doinst.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/network/postfix/doinst.sh b/network/postfix/doinst.sh index c4afc6a422..88fe4d3932 100644 --- a/network/postfix/doinst.sh +++ b/network/postfix/doinst.sh @@ -12,6 +12,17 @@ config() { # 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 +} + config etc/postfix/access.new config etc/postfix/aliases.new config etc/postfix/canonical.new @@ -26,6 +37,8 @@ config etc/postfix/transport.new config etc/postfix/virtual.new config etc/rc.d/rc.postfix.new +preserve_perms etc/rc.d/rc.postfix.new + # This is an incompatability with the sendmail package ( cd usr/lib; rm -f sendmail ) ( cd usr/lib; ln -s /usr/sbin/sendmail sendmail) |