From 42f91fc8f9467f9f7fb9ac7e6349b33964b63127 Mon Sep 17 00:00:00 2001 From: Guillaume Lambert Date: Wed, 10 Mar 2021 14:02:13 +0100 Subject: [COMMON] Fix ${foo:3[:1]} bashisms pointed out by checkbashisms Issue-ID: OOM-264 Signed-off-by: Guillaume Lambert Change-Id: Ief3b2595a55f0e7a0a2e7ab05857848c99ce42f9 --- .../portal-mariadb/resources/config/mariadb/docker-entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kubernetes/portal/components/portal-mariadb/resources') diff --git a/kubernetes/portal/components/portal-mariadb/resources/config/mariadb/docker-entrypoint.sh b/kubernetes/portal/components/portal-mariadb/resources/config/mariadb/docker-entrypoint.sh index 3d5e13ff5a..b416fdd5d8 100644 --- a/kubernetes/portal/components/portal-mariadb/resources/config/mariadb/docker-entrypoint.sh +++ b/kubernetes/portal/components/portal-mariadb/resources/config/mariadb/docker-entrypoint.sh @@ -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 @@ _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 -- cgit 1.2.3-korg