cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Ryan O'Hara <rohara@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] resource-agents: Use literal quotes for tr calls
Date: Mon, 31 Jan 2011 17:08:48 -0600	[thread overview]
Message-ID: <20110131230848.GA14627@redhat.com> (raw)
In-Reply-To: <1296514884-32766-1-git-send-email-lhh@redhat.com>


ACK.

On Mon, Jan 31, 2011 at 06:01:24PM -0500, Lon Hohberger wrote:
> This affects SAPInstance / SAPDatabase agents.
> 
> Resolves: rhbz#639252
> 
> Signed-off-by: Lon Hohberger <lhh@redhat.com>
> ---
>  rgmanager/src/resources/SAPDatabase |   16 ++++++++--------
>  rgmanager/src/resources/SAPInstance |    2 +-
>  2 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/rgmanager/src/resources/SAPDatabase b/rgmanager/src/resources/SAPDatabase
> index 8ac3005..5027018 100644
> --- a/rgmanager/src/resources/SAPDatabase
> +++ b/rgmanager/src/resources/SAPDatabase
> @@ -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"
> @@ -995,7 +995,7 @@ fi
>  if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then
>    LD_LIBRARY_PATH=$DIR_EXECUTABLE:$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
> diff --git a/rgmanager/src/resources/SAPInstance b/rgmanager/src/resources/SAPInstance
> index 94643c9..e70e2a3 100644
> --- a/rgmanager/src/resources/SAPInstance
> +++ b/rgmanager/src/resources/SAPInstance
> @@ -568,7 +568,7 @@ fi
>  if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then
>    LD_LIBRARY_PATH=$DIR_EXECUTABLE:$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
> -- 
> 1.7.2.3



      reply	other threads:[~2011-01-31 23:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-31 23:01 [Cluster-devel] [PATCH] resource-agents: Use literal quotes for tr calls Lon Hohberger
2011-01-31 23:08 ` Ryan O'Hara [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110131230848.GA14627@redhat.com \
    --to=rohara@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).