[COMMON] Fix ${p^^} bashisms

pointed out by checkbashisms

Issue-ID: OOM-2643
Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: I34d828ac4ab27b5ce6547a20aecc610cdcecf00e
diff --git a/kubernetes/common/cassandra/resources/config/docker-entrypoint.sh b/kubernetes/common/cassandra/resources/config/docker-entrypoint.sh
index c01d7c6..2d30f2e 100644
--- a/kubernetes/common/cassandra/resources/config/docker-entrypoint.sh
+++ b/kubernetes/common/cassandra/resources/config/docker-entrypoint.sh
@@ -71,7 +71,7 @@
                 start_rpc \
                 authenticator \
         ; do
-                var="CASSANDRA_${yaml^^}"
+                var="CASSANDRA_$(echo $yaml | tr '[:lower:]' '[:upper:]')"
                 # eval presents no security issue here because of limited possible values of var
                 eval val=\$$var
                 if [ "$val" ]; then
@@ -81,7 +81,7 @@
         done
 
         for rackdc in dc rack; do
-                var="CASSANDRA_${rackdc^^}"
+                var="CASSANDRA_$(echo $rackdc | tr '[:lower:]' '[:upper:]')"
                 # eval presents no security issue here because of limited possible values of var
                 eval val=\$$var
                 if [ "$val" ]; then
diff --git a/kubernetes/common/mariadb-init/resources/config/db_init.sh b/kubernetes/common/mariadb-init/resources/config/db_init.sh
index f130bb5..df7c336 100755
--- a/kubernetes/common/mariadb-init/resources/config/db_init.sh
+++ b/kubernetes/common/mariadb-init/resources/config/db_init.sh
@@ -21,8 +21,8 @@
 set -e
 
 while read DB ; do
-    USER_VAR="MYSQL_USER_${DB^^}"
-    PASS_VAR="MYSQL_PASSWORD_${DB^^}"
+    USER_VAR="MYSQL_USER_$(echo $DB | tr '[:lower:]' '[:upper:]')"
+    PASS_VAR="MYSQL_PASSWORD_$(echo $DB | tr '[:lower:]' '[:upper:]')"
 {{/*
     # USER=${!USER_VAR}
     # PASS=`echo -n ${!PASS_VAR} | sed -e "s/'/''/g"`