summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Bogusz2004-02-02 10:47:51 (GMT)
committercvs2git2012-06-24 12:13:13 (GMT)
commit4e11d284588a4f7df4ebf9f65011965580fd9de0 (patch)
tree730314a50ccd35580d89af32ad7e3041cee89d4d
parent9d1ad0efa1d35555d75820d12ff1903ba66b374d (diff)
downloadpostfix-4e11d284588a4f7df4ebf9f65011965580fd9de0.zip
postfix-4e11d284588a4f7df4ebf9f65011965580fd9de0.tar.gz
- setup myhostname only on installation, not upgrade (fixes BTS#828)
Changed files: postfix.spec -> 1.200
-rw-r--r--postfix.spec7
1 files changed, 5 insertions, 2 deletions
diff --git a/postfix.spec b/postfix.spec
index 13aa38d..1afc5cf 100644
--- a/postfix.spec
+++ b/postfix.spec
@@ -304,8 +304,11 @@ if ! grep -q "^postmaster:" /etc/mail/aliases; then
echo "Adding Entry for postmaster in /etc/mail/aliases" >&2
echo "postmaster: root" >>/etc/mail/aliases
fi
-if ! grep -q "^myhostname" /etc/mail/main.cf; then
- postconf -e myhostname=`/bin/hostname -f`
+if [ "$1" = "1" ]; then
+# only on installation, not upgrade
+ if ! grep -q "^myhostname" /etc/mail/main.cf; then
+ postconf -e myhostname=`/bin/hostname -f`
+ fi
fi
newaliases