packages: postfix/postfix.spec - hostname -d may return nothing but error (...

glen glen at pld-linux.org
Thu Dec 16 12:40:46 CET 2010


Author: glen                         Date: Thu Dec 16 11:40:46 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- hostname -d may return nothing but error (hostname: Unknown host); rel 2

---- Files affected:
packages/postfix:
   postfix.spec (1.352 -> 1.353) 

---- Diffs:

================================================================
Index: packages/postfix/postfix.spec
diff -u packages/postfix/postfix.spec:1.352 packages/postfix/postfix.spec:1.353
--- packages/postfix/postfix.spec:1.352	Wed Nov 24 17:16:58 2010
+++ packages/postfix/postfix.spec	Thu Dec 16 12:40:40 2010
@@ -34,7 +34,7 @@
 Summary(sk.UTF-8):	Agent prenosu pošty Postfix
 Name:		postfix
 Version:	2.7.2
-Release:	1
+Release:	2
 Epoch:		2
 License:	distributable
 Group:		Networking/Daemons/SMTP
@@ -368,8 +368,9 @@
 	# only on installation, not upgrade; set sane defaults
 	# postfix expects gethostname() to return FQDN, which is obviously wrong
 	if ! grep -qE "^my(domain|hostname)" %{_sysconfdir}/mail/main.cf; then
-		[ `/bin/hostname -d` != 'localdomain' ] && \
-			postconf -e mydomain=`/bin/hostname -d`
+		domain=$(/bin/hostname -d 2>/dev/null)
+		[ "$domain" != 'localdomain' ] && \
+			postconf -e mydomain="$domain"
 	fi
 else
 	%{_sbindir}/postfix upgrade-configuration
@@ -530,6 +531,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.353  2010/12/16 11:40:40  glen
+- hostname -d may return nothing but error (hostname: Unknown host); rel 2
+
 Revision 1.352  2010/11/24 16:16:58  glen
 - 2.7.2
 
================================================================

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



More information about the pld-cvs-commit mailing list