From 330f17ecbd5c60ae1bbff70027b6f455228c9568 Mon Sep 17 00:00:00 2001 From: Samir Costa Date: Thu, 18 Aug 2016 11:21:11 -0300 Subject: [PATCH 1/3] entrypoint ignoring non files --- docker-entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index ea896b99..8166494b 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -105,6 +105,10 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then echo for f in /docker-entrypoint-initdb.d/*; do + if [ ! -f "$f" ]; then + echo "$0: ignoring is not a file $f"; echo + continue + fi case "$f" in *.sh) echo "$0: running $f"; . "$f" ;; *.sql) echo "$0: running $f"; "${mysql[@]}" < "$f"; echo ;; From 9d308eaf6f098f6fef9b3718ee8f478c4f0bb484 Mon Sep 17 00:00:00 2001 From: samirfor Date: Thu, 18 Aug 2016 11:26:13 -0300 Subject: [PATCH 2/3] space to tabs --- docker-entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 8166494b..24238307 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -106,9 +106,9 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then echo for f in /docker-entrypoint-initdb.d/*; do if [ ! -f "$f" ]; then - echo "$0: ignoring is not a file $f"; echo - continue - fi + echo "$0: ignoring is not a file $f"; echo + continue + fi case "$f" in *.sh) echo "$0: running $f"; . "$f" ;; *.sql) echo "$0: running $f"; "${mysql[@]}" < "$f"; echo ;; From cd600f76894920f6ff69f93c24e3e1ed713cc322 Mon Sep 17 00:00:00 2001 From: samirfor Date: Thu, 18 Aug 2016 20:58:07 -0300 Subject: [PATCH 3/3] change echo ignoring not a file --- docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 24238307..e18cbd83 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -106,7 +106,7 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then echo for f in /docker-entrypoint-initdb.d/*; do if [ ! -f "$f" ]; then - echo "$0: ignoring is not a file $f"; echo + echo "$0: ignoring $f (not a file)"; echo continue fi case "$f" in