Accepting request 78363 from home:computersalat:devel:mail

rework SuSE patch

OBS-URL: https://build.opensuse.org/request/show/78363
OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=89
This commit is contained in:
Christian Wittmer 2011-08-09 11:17:40 +00:00 committed by Git OBS Bridge
parent 5fac98a1fc
commit c04773098b
2 changed files with 84 additions and 1 deletions

View File

@ -1,6 +1,83 @@
diff -ruN postfix-SuSE-orig/rc.postfix postfix-SuSE/rc.postfix
--- postfix-SuSE-orig/rc.postfix 2011-04-10 08:59:58.000000000 +0200
+++ postfix-SuSE/rc.postfix 2011-08-09 13:01:08.000000000 +0200
@@ -28,6 +28,7 @@
POSTFIX_BIN=/usr/sbin/postfix
POSTCONF=/usr/sbin/postconf
OPENSLP_BIN=/usr/bin/slptool
+PF_CHROOT=/var/spool/postfix
print_defaults=/usr/bin/my_print_defaults
test -x $POSTFIX_BIN || exit 5
@@ -61,7 +62,6 @@
}
chk_mysql_sock(){
- PF_CHROOT="/var/spool/postfix"
if [ -n "$($print_defaults mysqld)" ]; then
MYSQL_SOCKET=$($print_defaults mysqld | grep -e '--socket[[:blank:]=]' | awk -F"=" '{print $2}')
MYSQL_SOCKET_DIR=$(dirname $MYSQL_SOCKET)
@@ -86,6 +86,27 @@
return $RET
}
+chk_sasl_sock(){
+ SASL_SOCKET=/var/run/sasl2/mux
+ SASL_SOCKET_DIR=$(dirname $SASL_SOCKET)
+ CHR_SASL_SOCKET=${PF_CHROOT}${SASL_SOCKET}
+ CHR_SASL_SOCKET_DIR=$(dirname $CHR_SASL_SOCKET)
+ if [ -S $SASL_SOCKET ]; then
+ if [ -d $CHR_SASL_SOCKET_DIR ]; then
+ if grep $CHR_SASL_SOCKET_DIR /proc/mounts &> /dev/null; then
+ RET=0
+ else
+ RET=4
+ fi
+ else
+ RET=2
+ fi
+ else
+ RET=1
+ fi
+ return $RET
+}
+
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
@@ -147,6 +168,29 @@
rc_failed 1; rc_status -v; rc_exit;
}
;;
+ esac
+ fi
+ if [ "$(echo "$POSTFIX_SMTP_AUTH_SERVER" | tr 'A-Z' 'a-z' )" != "no" ]; then
+ chk_sasl_sock
+ case $? in
+ 1)
+warn_user "\tsaslauthd not started\n\
+\tPlease check if saslauthd is started on boot"
+ rc_failed 7; rc_status -v; rc_exit;
+ ;;
+ 2)
+warn_user "\t$CHR_SASL_SOCKET_DIR does not exist!!\n\
+\tThis should not happen!\n\
+\tPlease run SuSEconfig."
+ rc_failed 6; rc_status -v; rc_exit;
+ ;;
+ 4)
+ /bin/mount -o bind $SASL_SOCKET_DIR $CHR_SASL_SOCKET_DIR &> /dev/null
+ [ $? -ne 0 ] && {
+ echo -n " ... can not mount $SASL_SOCKET_DIR to $SASL_SOCKET_DIR"
+ rc_failed 1; rc_status -v; rc_exit;
+ }
+ ;;
esac
fi
fi
diff -ruN postfix-SuSE-orig/SuSEconfig.postfix postfix-SuSE/SuSEconfig.postfix diff -ruN postfix-SuSE-orig/SuSEconfig.postfix postfix-SuSE/SuSEconfig.postfix
--- postfix-SuSE-orig/SuSEconfig.postfix 2011-07-06 15:08:51.000000000 +0200 --- postfix-SuSE-orig/SuSEconfig.postfix 2011-07-06 15:08:51.000000000 +0200
+++ postfix-SuSE/SuSEconfig.postfix 2011-07-25 11:00:32.000000000 +0200 +++ postfix-SuSE/SuSEconfig.postfix 2011-08-09 13:01:55.000000000 +0200
@@ -91,6 +91,10 @@ @@ -91,6 +91,10 @@
\tPlease check if postfix-mysql is installed and check for package mysql." \tPlease check if postfix-mysql is installed and check for package mysql."
fi fi

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Aug 9 11:03:55 UTC 2011 - chris@computersalat.de
- rework SuSE patch
* add missing SASL stuff in rc.postfix
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jul 25 09:08:14 UTC 2011 - chris@computersalat.de Mon Jul 25 09:08:14 UTC 2011 - chris@computersalat.de