diff --git a/scripts/verify.sh b/scripts/verify.sh index 63e844b..fa68422 100644 --- a/scripts/verify.sh +++ b/scripts/verify.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash REQUIRED_TOOLS=("cloud-init" "wget" "curl") -CLEANUP_TOOLS=("kubeadm" "kubelet" "kubectl" "kubernetes-cni") +CLEANUP_TOOLS=("kubeadm" "kubelet" "kubectl" "kubernetes-cni" "docker") REQUIRED_KERNEL_VERSION=3.10 REQUIRED_SYSTEMD_VERSION=219 @@ -83,6 +83,13 @@ public::check::requiredtools() { else public::common::log "Check if $required_tool is installed." "pass" fi + $required_tool --version > /dev/null 2>&1 + if [ $? -ne 0 ];then + public::common::log "$required_tool is installed, but run $required_tool --version failed, may not work well." "fail" + exit 1 + else + public::common::log "Check if run $required_tool --version is ok." "pass" + fi done } @@ -111,4 +118,4 @@ public::check::cleanuptools #TODO #E.g. Check chronyd or ntpd is configured properly -#E.. Check iptables +#E.. Check iptables \ No newline at end of file