forked from pool/postfix
- bnc#863350 - SuSEconfig.postfix complains about modified /etc/postfix/main.cf after updating postfix
OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=187
This commit is contained in:
parent
f4d60b0a35
commit
10269e6084
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 9 12:17:35 UTC 2014 - varkoly@suse.com
|
||||
|
||||
- bnc#863350 - SuSEconfig.postfix complains about modified /etc/postfix/main.cf after updating postfix
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 26 17:21:54 UTC 2014 - chris@computersalat.de
|
||||
|
||||
|
27
postfix.spec
27
postfix.spec
@ -415,10 +415,33 @@ fi
|
||||
%post
|
||||
# We never have to run suseconfig for postfix after installation
|
||||
# We only start postfix own upgrade-configuration by update
|
||||
/usr/sbin/postfix set-permissions || :
|
||||
if [ ${1:-0} -gt 1 ]; then
|
||||
touch /var/adm/postfix.configured
|
||||
/usr/sbin/postfix upgrade-configuration || :
|
||||
# Check if main.cf and master.cf was changed manualy
|
||||
MAINCH=0
|
||||
if [ -e /var/adm/SuSEconfig/md5/etc/postfix/main.cf ]; then
|
||||
MD5SUM1=$( cat /var/adm/SuSEconfig/md5/etc/postfix/main.cf )
|
||||
MD5SUM2=$( grep -v "^#" /etc/postfix/main.cf | md5sum )
|
||||
if [ "$MD5SUM1" != "$MD5SUM2" ]; then
|
||||
MAINCH=1
|
||||
fi
|
||||
fi
|
||||
MASTERCH=0
|
||||
if [ -e /var/adm/SuSEconfig/md5/etc/postfix/master.cf ]; then
|
||||
MD5SUM1=$( cat /var/adm/SuSEconfig/md5/etc/postfix/master.cf )
|
||||
MD5SUM2=$( grep -v "^#" /etc/postfix/master.cf | md5sum )
|
||||
if [ "$MD5SUM1" != "$MD5SUM2" ]; then
|
||||
MASTERCH=1
|
||||
fi
|
||||
fi
|
||||
echo "Executing upgrade-configuration."
|
||||
/usr/sbin/postfix set-permissions upgrade-configuration setgid_group=%{pf_setgid_group}
|
||||
if [ $MASTERCH -eq 0 ]; then
|
||||
test -e /var/adm/SuSEconfig/md5/etc/postfix/master.cf && grep -v "^#" /etc/postfix/master.cf | md5sum > /var/adm/SuSEconfig/md5/etc/postfix/master.cf
|
||||
fi
|
||||
if [ $MAINCH -eq 0 ]; then
|
||||
test -e /var/adm/SuSEconfig/md5/etc/postfix/main.cf && grep -v "^#" /etc/postfix/main.cf | md5sum > /var/adm/SuSEconfig/md5/etc/postfix/main.cf
|
||||
fi
|
||||
fi
|
||||
%{fillup_and_insserv -y postfix}
|
||||
%{fillup_only -an mail}
|
||||
|
Loading…
Reference in New Issue
Block a user