Fix postfix hostname bug GenaSYS-2.6.2
authorMichael Peters <mpeters@emeralddata.net>
Tue, 9 Sep 2014 16:48:32 +0000 (12:48 -0400)
committerAndy Witter <awitter@georgialibraries.org>
Tue, 9 Sep 2014 16:48:32 +0000 (12:48 -0400)
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.

GenaSYS.sh

index 80a0fbc..d11e3b9 100755 (executable)
@@ -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 <awitter@georgialibraries.org>"
         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"