packages: postfix/postfix.spec - avoid writing empty "mydomain" to config

glen glen at pld-linux.org
Sun Nov 27 22:37:47 CET 2011


Author: glen                         Date: Sun Nov 27 21:37:47 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- avoid writing empty "mydomain" to config

---- Files affected:
packages/postfix:
   postfix.spec (1.364 -> 1.365) 

---- Diffs:

================================================================
Index: packages/postfix/postfix.spec
diff -u packages/postfix/postfix.spec:1.364 packages/postfix/postfix.spec:1.365
--- packages/postfix/postfix.spec:1.364	Sun Nov  6 19:44:09 2011
+++ packages/postfix/postfix.spec	Sun Nov 27 22:37:42 2011
@@ -385,7 +385,7 @@
 	# postfix expects gethostname() to return FQDN, which is obviously wrong
 	if ! grep -qE "^my(domain|hostname)" %{_sysconfdir}/mail/main.cf; then
 		domain=$(/bin/hostname -d 2>/dev/null)
-		[ "$domain" != 'localdomain' ] && \
+		[ -n "$domain" -a "$domain" != 'localdomain' ] && \
 			postconf -e mydomain="$domain"
 	fi
 else
@@ -555,6 +555,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.365  2011/11/27 21:37:42  glen
+- avoid writing empty "mydomain" to config
+
 Revision 1.364  2011/11/06 18:44:09  lisu
 - updated to 2.8.7 by shadzik
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/postfix/postfix.spec?r1=1.364&r2=1.365&f=u



More information about the pld-cvs-commit mailing list