network/postfix: Fix permission.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Willy Sudiarto Raharjo 2015-05-15 13:33:48 +07:00
parent ddbf14d3ee
commit 2f376959a7
2 changed files with 14 additions and 1 deletions

View File

@ -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)

View File

@ -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