cluster: RHEL57 - resource-agents: Apache resource with spaces in name fails to start

Marek Grác marx at fedoraproject.org
Mon Feb 7 13:53:12 UTC 2011


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=6d0b3a728aa478d73621fa003be63806d3623b26
Commit:        6d0b3a728aa478d73621fa003be63806d3623b26
Parent:        dbbb859091a700db2fc4dcd4e4df4a0dfdaa84b1
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Mon Feb 7 14:12:47 2011 +0100
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Mon Feb 7 14:51:57 2011 +0100

resource-agents: Apache resource with spaces in name fails to start

Resolve: rhbz#632704
---
 rgmanager/src/resources/utils/config-utils.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/rgmanager/src/resources/utils/config-utils.sh b/rgmanager/src/resources/utils/config-utils.sh
index 60fc6e0..5646fa8 100644
--- a/rgmanager/src/resources/utils/config-utils.sh
+++ b/rgmanager/src/resources/utils/config-utils.sh
@@ -27,7 +27,7 @@ declare -a ip_keys
 
 generate_configTemplate()
 {
-	cat > $1 << EOT
+	cat > "$1" << EOT
 #
 # "$1" was created from the "$2"
 #
@@ -53,8 +53,8 @@ sha1_verify()
 
 	ocf_log debug "Checking: SHA1 checksum of config file $oldFile"
 
-	sha1_new=`cat $oldFile | grep -v "# rgmanager-sha1" | sha1sum | sed 's/^\([a-z0-9]\+\) .*$/\1/'`
-	sha1_old=`tail -n 1 $oldFile | sed 's/^# rgmanager-sha1 \(.*\)$/\1/' | sed 's/^\([a-z0-9]\+\) .*$/\1/'`
+	sha1_new=`cat "$oldFile" | grep -v "# rgmanager-sha1" | sha1sum | sed 's/^\([a-z0-9]\+\) .*$/\1/'`
+	sha1_old=`tail -n 1 "$oldFile" | sed 's/^# rgmanager-sha1 \(.*\)$/\1/' | sed 's/^\([a-z0-9]\+\) .*$/\1/'`
 
 	if [ $sha1_new = $sha1_old ]; then
 	        ocf_log debug "Checking: SHA1 checksum > succeed"
@@ -304,4 +304,4 @@ check_pid_file() {
 	fi
 
 	return 1;
-}
\ No newline at end of file
+}


More information about the cluster-commits mailing list