aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/portal/components/portal-mariadb/resources/config
diff options
context:
space:
mode:
authorguillaume.lambert <guillaume.lambert@orange.com>2021-12-07 17:40:54 +0100
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-12-13 07:38:21 +0000
commit02aaff02c53e11a5e6020d11d7c24654dc0d60fb (patch)
treebb6d5bd2c100095da72bd2cddbf3880083cd9037 /kubernetes/portal/components/portal-mariadb/resources/config
parent296fa7fdb76c56a2d59e6f33f5e8745c23138f9b (diff)
[COMMON] Fix FUNCNAME bashisms
pointed out by checkbashisms. Issue-ID: OOM-2643 Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com> Change-Id: I949263ef21c3dd600b2040491428fdba6cba69ef
Diffstat (limited to 'kubernetes/portal/components/portal-mariadb/resources/config')
-rw-r--r--kubernetes/portal/components/portal-mariadb/resources/config/mariadb/docker-entrypoint.sh10
1 files changed, 2 insertions, 8 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 fe496bc47d..ddaf099bdf 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
@@ -50,13 +50,6 @@ file_env() {
unset "$fileVar"
}
-# check to see if this file is being run or sourced from another script
-_is_sourced() {
- # https://unix.stackexchange.com/a/215279
- [ "${#FUNCNAME[@]}" -ge 2 ] \
- && [ "${FUNCNAME[0]}" = '_is_sourced' ] \
- && [ "${FUNCNAME[1]}" = 'source' ]
-}
# usage: docker_process_init_files [file [file [...]]]
# ie: docker_process_init_files /always-initdb.d/*
@@ -378,6 +371,7 @@ _main() {
}
# If we are sourced from elsewhere, don't perform any further actions
-if ! _is_sourced; then
+# https://stackoverflow.com/questions/2683279/how-to-detect-if-a-script-is-being-sourced/2942183#2942183
+if [ "$(basename $0)" = "docker-entrypoint.sh" ]; then
_main "$@"
fi