diff --git a/postfix.changes b/postfix.changes index da2ba2d..d300e6b 100644 --- a/postfix.changes +++ b/postfix.changes @@ -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 diff --git a/postfix.spec b/postfix.spec index a67d78e..468ff5c 100644 --- a/postfix.spec +++ b/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}