6 |
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 [\/] [" "] |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 |
7 |
PASSWORD=${PAM_DBPSW} |
PASSWORD=${PAM_DBPSW} |
8 |
if [ $# -gt 0 ]; then |
if [ $# -gt 0 ]; then |
9 |
I=1 |
for INPUT in $*; do |
|
while [ $I -le $# ]; do |
|
|
if [ $I -eq 1 ]; then |
|
|
INPUT=$1 |
|
|
fi |
|
|
if [ $I -eq 2 ]; then |
|
|
INPUT=$2 |
|
|
fi |
|
|
if [ $I -eq 3 ]; then |
|
|
INPUT=$3 |
|
|
fi |
|
|
if [ $I -eq 4 ]; then |
|
|
INPUT=$4 |
|
|
fi |
|
10 |
if [ $INPUT == "--help" ] || [ $INPUT == "-h" ]; then |
if [ $INPUT == "--help" ] || [ $INPUT == "-h" ]; then |
11 |
echo "" |
echo "" |
12 |
echo " Usage: ./install_DB.sh [options] " |
echo " Usage: ./install_DB.sh [options] " |
37 |
PASSWORD=`echo $TEST` |
PASSWORD=`echo $TEST` |
38 |
export PASSWORD; |
export PASSWORD; |
39 |
fi |
fi |
|
let I=$I+1 |
|
40 |
done |
done |
41 |
else |
else |
42 |
if [ "$USERNAME" == "" ] || [ "$HOST" == "" ] || [ "$DBNAME" == "" ]; then |
if [ "$USERNAME" == "" ] || [ "$HOST" == "" ] || [ "$DBNAME" == "" ]; then |