This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
cluster: STABLE3 - apache.sh: #489785 - does not handle a valid/etc/httpd/conf/httpd.conf configuration correctly
- From: Marek GrÃc <marx at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Fri, 22 May 2009 14:29:42 +0000 (UTC)
- Subject: cluster: STABLE3 - apache.sh: #489785 - does not handle a valid/etc/httpd/conf/httpd.conf configuration correctly
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=28f3ab6ed32dd77e34721cf5feab9ebd419d4c07
Commit: 28f3ab6ed32dd77e34721cf5feab9ebd419d4c07
Parent: 3f4c655b0e025fbf591c8fef04c459d6d29f4cd8
Author: Marek 'marx' Grac <mgrac@redhat.com>
AuthorDate: Fri May 22 16:24:38 2009 +0200
Committer: Marek 'marx' Grac <mgrac@redhat.com>
CommitterDate: Fri May 22 16:26:51 2009 +0200
apache.sh: #489785 - does not handle a valid /etc/httpd/conf/httpd.conf configuration correctly
---
rgmanager/src/resources/apache.sh | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/rgmanager/src/resources/apache.sh b/rgmanager/src/resources/apache.sh
index 7f86838..bb225aa 100644
--- a/rgmanager/src/resources/apache.sh
+++ b/rgmanager/src/resources/apache.sh
@@ -116,8 +116,12 @@ EOT
IFS_old="$IFS"
IFS=$'\n'
- for i in `"$APACHE_parseConfig" -D"$OCF_RESKEY_name" < "$originalConfigFile" | grep -E '(^Listen)|(^Port)' | grep -v ':'`; do
+ for i in `"$APACHE_parseConfig" -D"$OCF_RESKEY_name" < "$originalConfigFile" | grep -P '(^Listen)|(^Port)' `; do
port=`echo $i | sed 's/^Listen \(.*\)/\1/;s/^Port \(.*\)/\1/'`;
+ testcond=`echo $port|grep :`
+ if [ $testcond ]; then
+ port=`echo $port|awk -F : '{print $2}'`
+ fi
IFS=$' ';
for z in $ip_addresses; do
echo "Listen $z:$port" >> "$generatedConfigFile";