Permalink
Browse files

resource-agents: Use literal quotes for tr calls

This affects SAPInstance / SAPDatabase agents.

Resolves: rhbz#639252

Signed-off-by: Lon Hohberger <lhh@redhat.com>
Reviewed-by: Ryan O'Hara <rohara@redhat.com>
  • Loading branch information...
1 parent 488c4ff commit f9960d41fb8adced22c83e6db73d950b31f7cde1 Lon Hohberger committed Jan 12, 2011
Showing with 9 additions and 9 deletions.
  1. +8 −8 rgmanager/src/resources/SAPDatabase
  2. +1 −1 rgmanager/src/resources/SAPInstance
@@ -201,7 +201,7 @@ do_exit() {
# listener_start: Start the given listener
#
listener_start() {
- orasid="ora`echo $SID | tr [:upper:] [:lower:]`"
+ orasid="ora`echo $SID | tr '[:upper:]' '[:lower:]'`"
rc=$OCF_SUCCESS
output=`echo "lsnrctl start $NETSERVICENAME" | su - $orasid 2>&1`
if [ $? -eq 0 ]
@@ -219,7 +219,7 @@ listener_start() {
# listener_stop: Stop the given listener
#
listener_stop() {
- orasid="ora`echo $SID | tr [:upper:] [:lower:]`"
+ orasid="ora`echo $SID | tr '[:upper:]' '[:lower:]'`"
rc=$OCF_SUCCESS
if
listener_status
@@ -243,7 +243,7 @@ listener_stop() {
# listener_status: is the given listener running?
#
listener_status() {
- orasid="ora`echo $SID | tr [:upper:] [:lower:]`"
+ orasid="ora`echo $SID | tr '[:upper:]' '[:lower:]'`"
# Note: ps cuts off it's output at column $COLUMNS, so "ps -ef" can not be used here
# as the output might be to long.
cnt=`ps efo args --user $orasid | grep $NETSERVICENAME | grep -c tnslsnr`
@@ -502,7 +502,7 @@ exit \$rc" > $TEMPFILE
# db6udb_recover: try to recover DB/2 after a crash
#
db6udb_recover() {
- db2sid="db2`echo $SID | tr [:upper:] [:lower:]`"
+ db2sid="db2`echo $SID | tr '[:upper:]' '[:lower:]'`"
echo '#!/bin/sh
LOG=$HOME/recover.log
@@ -752,11 +752,11 @@ sapdatabase_status() {
SNUM=2
;;
ORA) SEARCH="ora_[a-z][a-z][a-z][a-z]_"
- SUSER="ora`echo $SID | tr [:upper:] [:lower:]`"
+ SUSER="ora`echo $SID | tr '[:upper:]' '[:lower:]'`"
SNUM=4
;;
DB6) SEARCH="db2[a-z][a-z][a-z][a-z][a-z]"
- SUSER="db2`echo $SID | tr [:upper:] [:lower:]`"
+ SUSER="db2`echo $SID | tr '[:upper:]' '[:lower:]'`"
SNUM=5
;;
esac
@@ -876,7 +876,7 @@ if [ -z "$OCF_RESKEY_DBTYPE" ]; then
ocf_log err "Please set OCF_RESKEY_DBTYPE to the database vendor specific tag (ORA,ADA,DB6)!"
do_exit $OCF_ERR_ARGS
fi
-DBTYPE=`echo "$OCF_RESKEY_DBTYPE" | tr "[a-z]" "[A-Z]"`
+DBTYPE=`echo "$OCF_RESKEY_DBTYPE" | tr '[a-z]' '[A-Z]'`
# optional OCF parameters, we try to guess which directories are correct
EXESTARTDB="startdb"
@@ -996,7 +996,7 @@ if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then
LD_LIBRARY_PATH=$DIR_EXECUTABLE${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
fi
-sidadm="`echo $SID | tr [:upper:] [:lower:]`adm"
+sidadm="`echo $SID | tr '[:upper:]' '[:lower:]'`adm"
# What kind of method was invoked?
case "$1" in
@@ -569,7 +569,7 @@ if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then
LD_LIBRARY_PATH=$DIR_EXECUTABLE${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
fi
-sidadm="`echo $SID | tr [:upper:] [:lower:]`adm"
+sidadm="`echo $SID | tr '[:upper:]' '[:lower:]'`adm"
# What kind of method was invoked?
case "$1" in

0 comments on commit f9960d4

Please sign in to comment.