/[PAMELA software]/YodaProfiler/docs/install_DB.sh
ViewVC logotype

Diff of /YodaProfiler/docs/install_DB.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by mocchiut, Tue Oct 31 16:49:46 2006 UTC revision 1.5 by mocchiut, Tue Nov 7 12:17:44 2006 UTC
# Line 4  USERNAME=${PAM_DBUSER} Line 4  USERNAME=${PAM_DBUSER}
4  HOST=""  HOST=""
5  DBNAME=""  DBNAME=""
6  FORCE="no"  FORCE="no"
7  COUNT=0;for word in `echo ${PAM_DBHOST} | tr [\/] [" "] |sed 's/mysql://g' `; do if [ $COUNT -eq 0 ]; then HOST=`echo $word`; fi; if [ $COUNT -eq 1 ]; then DBNAME=`echo $word`; fi; let COUNT=$COUNT+1; done  COUNT=0;for word in `echo ${PAM_DBHOST} | tr [\/] [" "] |tr [?] [" "] |sed 's/mysql://g' `; do if [ $COUNT -eq 0 ]; then HOST=`echo $word`; fi; if [ $COUNT -eq 1 ]; then DBNAME=`echo $word`; fi; let COUNT=$COUNT+1; done
8  PASSWORD=${PAM_DBPSW}  PASSWORD=${PAM_DBPSW}
9  if [ $# -gt 0 ]; then  if [ $# -gt 0 ]; then
10      for INPUT in $*; do      for INPUT in $*; do
# Line 31  if [ $# -gt 0 ]; then Line 31  if [ $# -gt 0 ]; then
31          fi          fi
32          TEST=`echo $INPUT | sed 's/--host=//g'`          TEST=`echo $INPUT | sed 's/--host=//g'`
33          if [ $TEST != $INPUT  ]; then          if [ $TEST != $INPUT  ]; then
34              COUNT=0;for word in `echo $TEST | tr [\/] [" "] |sed 's/mysql://g' `; do if [ $COUNT -eq 0 ]; then HOST=`echo $word`; fi; if [ $COUNT -eq 1 ]; then DBNAME=`echo $word`; fi; let COUNT=$COUNT+1; done              COUNT=0;for word in `echo $TEST | tr [\/] [" "] | tr [?] [" "] | sed 's/mysql://g' `; do if [ $COUNT -eq 0 ]; then HOST=`echo $word`; fi; if [ $COUNT -eq 1 ]; then DBNAME=`echo $word`; fi; let COUNT=$COUNT+1; done
35              export DBNAME;              export DBNAME;
36              export HOST;              export HOST;
37          fi          fi

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.23