Ignore:
Timestamp:
12/18/16 23:46:07 (8 years ago)
Author:
Daniela Dorner
Message:
introduced usage of file for mysql pw to avoid warnings
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/Sourcefile.sh

    r18668 r18694  
    127127# alias (we cannot check the beginning of the line due to
    128128# color codes in filldotraw.C)
    129 alias 'intgrep'='grep -E -o \\\(int\\\)[0-9]+$ | grep -E -o [0-9]+'
     129alias 'intgrep'='grep -E -o \\\("(int|Bool_t)"\\\)[0-9]+$ | grep -E -o [0-9]+'
    130130
    131131
     
    168168{
    169169   db=`grep Database $sqlrc | grep -v '#' | sed -e 's/Database: //' -e 's/ //g'`
    170    pw=`grep Password $sqlrc | grep -v '#' | sed -e 's/Password: //' -e 's/ //g'`
     170   pw="--password="`grep Password $sqlrc | grep -v '#' | sed -e 's/Password: //' -e 's/ //g'`
    171171   us=`grep User $sqlrc | grep -v '#' | sed -e 's/User: //' -e 's/ //g'`
    172172   ho=`grep URL $sqlrc | grep -v '#' | sed -e 's/ //g' -e 's/URL:mysql:\/\///'`
     173   if [ "$sqlpw" != "" ]
     174   then
     175      pwfile="--defaults-file=$sqlpw"
     176      pw=""
     177   fi
    173178#   echo "setup: "
    174179#   echo " db: "$db
     
    183188   getdbsetup
    184189   printprocesslog "DEBUG sendquery QUERY: "$query
    185    if ! val=`mysql -s -u $us --password=$pw --host=$ho $db -e " $query "`
     190   if ! val=`mysql $pwfile -s -u $us $pw --host=$ho $db -e " $query "`
    186191   then
    187192      printprocesslog "ERROR could not query DB "$db" on host "$ho" with user "$us
     
    341346   # execute query
    342347   #numproc=`sendquery `#cannot be done with sendquery, because of row counting
    343    if ! numproc=`mysql -s -u $us --password=$pw --host=$ho $db -e " $query " | wc -l`
     348   if ! numproc=`mysql $pwfile -s -u $us $pw --host=$ho $db -e " $query " | wc -l`
    344349   then
    345350      printprocesslog "ERROR could not query number of processes from db (program: $program, function getstatus)"
Note: See TracChangeset for help on using the changeset viewer.