cluster: STABLE3 - resource agents: Remove bashisms from resource scripts

Fabio M. Di Nitto fabbione at fedoraproject.org
Mon Jul 5 11:06:00 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=2d62c9fb0363b137d6d48ac6f8adc6104c81a666
Commit:        2d62c9fb0363b137d6d48ac6f8adc6104c81a666
Parent:        4d24a40f7d0b19d145d03c365a9505fe0927b886
Author:        Fabio M. Di Nitto <fdinitto at redhat.com>
AuthorDate:    Mon Jul 5 13:04:21 2010 +0200
Committer:     Fabio M. Di Nitto <fdinitto at redhat.com>
CommitterDate: Mon Jul 5 13:04:21 2010 +0200

resource agents: Remove bashisms from resource scripts

Patch from Guido Gunter <agx at sigxcpu.org>

Closes Debian Bug: #581137

Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
 rgmanager/src/resources/SAPDatabase |    2 +-
 rgmanager/src/resources/SAPInstance |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rgmanager/src/resources/SAPDatabase b/rgmanager/src/resources/SAPDatabase
index 8ac3005..e1249b8 100644
--- a/rgmanager/src/resources/SAPDatabase
+++ b/rgmanager/src/resources/SAPDatabase
@@ -560,7 +560,7 @@ sapuserexit() {
     if [ -x "$VALUE" ]
     then
       ocf_log info "Calling userexit ${NAME} with customer script file ${VALUE}"
-      eval "$VALUE" >& /dev/null
+      eval "$VALUE" > /dev/null 2>&1
       ocf_log info "Exiting userexit ${NAME} with customer script file ${VALUE}, returncode: $?"
     else
       ocf_log warn "Attribute ${NAME} is set to ${VALUE}, but this file is not executable"
diff --git a/rgmanager/src/resources/SAPInstance b/rgmanager/src/resources/SAPInstance
index 94643c9..a97aaf6 100644
--- a/rgmanager/src/resources/SAPInstance
+++ b/rgmanager/src/resources/SAPInstance
@@ -234,7 +234,7 @@ sapuserexit() {
     if [ -x "$VALUE" ]
     then
       ocf_log info "Calling userexit ${NAME} with customer script file ${VALUE}"
-      eval "$VALUE" >& /dev/null
+      eval "$VALUE" > /dev/null 2>&1
       ocf_log info "Exiting userexit ${NAME} with customer script file ${VALUE}, returncode: $?"
     else
       ocf_log warn "Attribute ${NAME} is set to ${VALUE}, but this file is not executable"


More information about the cluster-commits mailing list