From: Michael Peters Date: Tue, 9 Sep 2014 16:48:32 +0000 (-0400) Subject: Fix postfix hostname bug X-Git-Tag: GenaSYS-2.6.2 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=be5a496774d58f8b94aaac8a72a8c8b4769b73e7;p=contrib%2Fpines%2Fgenasys.git Fix postfix hostname bug Chris Sharp discovered a bug in the Postfix main.cf file generated by GenaSYS when the user elects not to use a prefix for their cluster. When prefix was not selected, the sed operation to replace "HostName" with the proper name of the LVS server(s) did not take place. This patch ensures that happens regardless of whether the user elects to use a prefix or not. --- diff --git a/GenaSYS.sh b/GenaSYS.sh index 80a0fbc..d11e3b9 100755 --- a/GenaSYS.sh +++ b/GenaSYS.sh @@ -25,7 +25,7 @@ PURPOSE_="Generate config files needed for Evergreen-ILS Cluster" SYNOPSIS_="$NAME_" REQUIRES_="standard GNU commands, apt, dpkg" - VERSION_="1.35" + VERSION_="1.36" DATE_="2010-09-23; last update: 2014-07-16" AUTHOR_="Andy Witter " URL_="http://evergreen-ils.org" @@ -1479,11 +1479,7 @@ for LVS in $MACHINES_LVS_ONLY sed -i "s^CLUSTER_DOMAIN_NAME^$CLUSTERDOMAINNAME^g" "$OUTDIR/$LVS/etc/resolv.conf" - if [ -n "$HOSTNAME_PREFIX" ]; then - #sed -i "s^\(myhostname = \)\([A-Za-z0-9-]*\.ClusterDomainName\)^\1$HOSTNAME_PREFIX-\2^g" "$OUTDIR/$LVS/etc/postfix/main.cf" - #sed -i "s^\(mydestination = \)\([A-Za-z0-9-]*\.ClusterDomainName\)^\1$HOSTNAME_PREFIX-\2^g" "$OUTDIR/$LVS/etc/postfix/main.cf" - sed -i "s^HostName^$LVS^g" "$OUTDIR/$LVS/etc/postfix/main.cf" - fi + sed -i "s^HostName^$LVS^g" "$OUTDIR/$LVS/etc/postfix/main.cf" sed -i "s^ClusterDomainName^$CLUSTERDOMAINNAME^g" "$OUTDIR/$LVS/etc/postfix/main.cf" sed -i "s^Priv_NET^${PRIVATENET}^g" "$OUTDIR/$LVS/etc/network/iptables-rules.fw" sed -i "s^Priv_NET^${PRIVATENET}^g" "$OUTDIR/$LVS/etc/postfix/main.cf"