From a24e8204db526b22a68d15dbe50aeeb7a8330391 Mon Sep 17 00:00:00 2001 From: Alex Wong Date: Thu, 18 Jun 2020 14:59:47 +0800 Subject: [PATCH] fix: docker startup err not detected --- build/docker/tools/tke-installer/install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build/docker/tools/tke-installer/install.sh b/build/docker/tools/tke-installer/install.sh index ddb0e8934..f45b005f6 100755 --- a/build/docker/tools/tke-installer/install.sh +++ b/build/docker/tools/tke-installer/install.sh @@ -86,13 +86,14 @@ function install_docker() { # becuase first start docker may be restart some times systemctl start docker || : - for i in {1..60}; do + secs=60 + for i in `seq 1 $secs`; do if systemctl is-active --quiet docker; then break fi sleep 1 done - if (( i == 10)); then + if (( i == secs )); then echo "start docker failed, please check docker service." exit 1 fi