]> git.pld-linux.org Git - packages/postfix.git/commitdiff
- hostname -d may return nothing but error (hostname: Unknown host); rel 2 auto/ac/postfix-2_7_2-2
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 16 Dec 2010 11:40:40 +0000 (11:40 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    postfix.spec -> 1.353

postfix.spec

index d484cac6fbf3b89753639c949a974ca94e183ffd..ff75b2d5f78b83ad63ec13e8af7c4df0b580a678 100644 (file)
@@ -33,7 +33,7 @@ Summary(pt_BR.UTF-8): Postfix - Um MTA (Mail Transport Agent) de alto desempenho
 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
@@ -367,8 +367,9 @@ if [ "$1" = "1" ]; then
        # 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
This page took 0.354896 seconds and 4 git commands to generate.