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 | |
parent | ddbf14d3ee1321e479e821667df3afaf0c8dc7e0 (diff) | |
download | slackbuilds-2f376959a7f323d848e31888fff6d4fad4a8b4a3.tar.gz |
network/postfix: Fix permission.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | network/postfix/doinst.sh | 13 | ||||
-rw-r--r-- | network/postfix/postfix.SlackBuild | 2 |
2 files changed, 14 insertions, 1 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) diff --git a/network/postfix/postfix.SlackBuild b/network/postfix/postfix.SlackBuild index eba980389a..011a5f2def 100644 --- a/network/postfix/postfix.SlackBuild +++ b/network/postfix/postfix.SlackBuild @@ -186,7 +186,7 @@ cp -r AAAREADME COMPATIBILITY COPYRIGHT HISTORY IPv6-ChangeLog LICENSE \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/postfix.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/postfix.SlackBuild -install -m 0755 $CWD/rc.postfix $PKG/etc/rc.d/rc.postfix.new +install -m 0644 $CWD/rc.postfix $PKG/etc/rc.d/rc.postfix.new cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh |