summaryrefslogtreecommitdiffstats
path: root/kubernetes/portal/components/portal-mariadb
diff options
context:
space:
mode:
authorGuillaume Lambert <guillaume.lambert@orange.com>2021-03-10 14:02:13 +0100
committerguillaume.lambert <guillaume.lambert@orange.com>2021-09-06 09:01:11 +0200
commit42f91fc8f9467f9f7fb9ac7e6349b33964b63127 (patch)
tree9ea70aca88543948c7247bad17217ab94c296ea4 /kubernetes/portal/components/portal-mariadb
parent3980a8cbeb63c885b123ac50033e32ed996bb39a (diff)
[COMMON] Fix ${foo:3[:1]} bashisms
pointed out by checkbashisms Issue-ID: OOM-264 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: Ief3b2595a55f0e7a0a2e7ab05857848c99ce42f9
Diffstat (limited to 'kubernetes/portal/components/portal-mariadb')
-rw-r--r--kubernetes/portal/components/portal-mariadb/resources/config/mariadb/docker-entrypoint.sh4
1 files changed, 2 insertions, 2 deletions
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