From be5a496774d58f8b94aaac8a72a8c8b4769b73e7 Mon Sep 17 00:00:00 2001 From: Michael Peters Date: Tue, 9 Sep 2014 12:48:32 -0400 Subject: [PATCH] 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. --- GenaSYS.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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" -- 2.11.0