5 |
DBNAME="" |
DBNAME="" |
6 |
FORCE="no" |
FORCE="no" |
7 |
GPAMELA="no" |
GPAMELA="no" |
8 |
|
GPAMELAROTRASL="no" |
9 |
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 |
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 |
10 |
PASSWORD=${PAM_DBPSW} |
PASSWORD=${PAM_DBPSW} |
11 |
if [ $# -gt 0 ]; then |
if [ $# -gt 0 ]; then |
50 |
GPAMELA="yes"; |
GPAMELA="yes"; |
51 |
export GPAMELA; |
export GPAMELA; |
52 |
fi |
fi |
53 |
|
if [ "$INPUT" == "--gpamela-rotrasl" ]; then |
54 |
|
GPAMELAROTRASL="yes"; |
55 |
|
export GPAMELAROTRASL; |
56 |
|
fi |
57 |
done |
done |
58 |
else |
else |
59 |
if [ "$USERNAME" == "" ] || [ "$HOST" == "" ] || [ "$DBNAME" == "" ]; then |
if [ "$USERNAME" == "" ] || [ "$HOST" == "" ] || [ "$DBNAME" == "" ]; then |
105 |
# |
# |
106 |
echo "" |
echo "" |
107 |
rm -rf ${THISDIR}/temp.sql |
rm -rf ${THISDIR}/temp.sql |
108 |
|
# |
109 |
|
# |
110 |
|
if [ "$GPAMELAROTRASL" == "yes" ]; then |
111 |
|
echo "" |
112 |
|
echo " Adapting GL_PARAM table to be used with simulated data (\"rotrasl\" version)" |
113 |
|
echo "" |
114 |
|
# |
115 |
|
rm -rf ${THISDIR}/temp.sql |
116 |
|
# |
117 |
|
cat ${THISDIR}/GP_PARAM_rotrasl.sql | sed 's/dbname/'${DBNAME}'/g' >> ${THISDIR}/temp.sql |
118 |
|
mysql --user=$USERNAME --password=$PASSWORD --host=$HOST < ${THISDIR}/temp.sql |
119 |
|
# |
120 |
|
echo " done! " |
121 |
|
fi; |
122 |
|
# |
123 |
|
echo "" |
124 |
|
rm -rf ${THISDIR}/temp.sql |
125 |
|
|
126 |
|
|
127 |
|
|
128 |
|
|
129 |
|
|
130 |
|
|