From: Krzysztof Opasiak Date: Tue, 7 Sep 2021 07:22:57 +0000 (+0000) Subject: Merge "[COMMON] Fix brace expansion bashisms" X-Git-Tag: 9.0.0~144 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=69abc8725b0c862ab06526034118402315f97093;hp=-c;p=oom.git Merge "[COMMON] Fix brace expansion bashisms" --- 69abc8725b0c862ab06526034118402315f97093 diff --combined kubernetes/portal/components/portal-mariadb/resources/config/mariadb/docker-entrypoint.sh index b416fdd5d8,a3f8da4cea..b07d127ff8 --- a/kubernetes/portal/components/portal-mariadb/resources/config/mariadb/docker-entrypoint.sh +++ b/kubernetes/portal/components/portal-mariadb/resources/config/mariadb/docker-entrypoint.sh @@@ -106,7 -106,7 +106,7 @@@ docker_temp_server_start() "$@" --skip-networking --socket="${SOCKET}" & mysql_note "Waiting for server startup" local i - for i in {30..0}; do + for i in $(seq 30 -1 0); do # only use the root password if the database has already been initializaed # so that it won't try to fill in a password file when it hasn't been set yet extraArgs="" @@@ -164,7 -164,7 +164,7 @@@ docker_init_database_dir() installArgs=${installArgs}" --auth-root-authentication-method=normal" fi # "Other options are passed to mysqld." (so we pass all "mysqld" arguments directly here) - mysql_install_db ${installArgs} "${@:2}" + mysql_install_db ${installArgs} "$(echo ${@} | sed 's/^ *[^ ]* *//')" mysql_note "Database files initialized" } @@@ -313,7 -313,7 +313,7 @@@ _mysql_want_help() _main() { # if command starts with an option, prepend mysqld - if [ "${1:0:1}" = '-' ]; then + if echo "$1" | grep '^-' >/dev/null; then set -- mysqld "$@" fi