diff --git a/deploy-edgecluster/configure_disconnected.sh b/deploy-edgecluster/configure_disconnected.sh index 1b293f4c1..9576b5dff 100755 --- a/deploy-edgecluster/configure_disconnected.sh +++ b/deploy-edgecluster/configure_disconnected.sh @@ -11,7 +11,7 @@ function copy_files() { dst_folder=${3} if [[ -z ${src_files} ]]; then - echo "Source files variable empty: ${src_files[@]}" + echo "Source files variable empty: " "${src_files[@]}" exit 1 fi @@ -25,8 +25,8 @@ function copy_files() { exit 1 fi - echo "Copying source files: ${src_files[@]} to Node ${dst_node}" - ${SCP_COMMAND} -i ${RSA_KEY_FILE} ${src_files[@]} core@${dst_node}:${dst_folder} + echo "Copying source files: " "${src_files[@]}" "to Node ${dst_node}" + ${SCP_COMMAND} -i ${RSA_KEY_FILE} "${src_files[@]}" core@${dst_node}:${dst_folder} } function grab_master_ext_ips() { diff --git a/deploy-metallb/deploy.sh b/deploy-metallb/deploy.sh index dcc782220..31e1b6a95 100755 --- a/deploy-metallb/deploy.sh +++ b/deploy-metallb/deploy.sh @@ -192,7 +192,7 @@ function copy_files() { dst_folder=${3} if [[ -z ${src_files} ]]; then - echo "Source files variable empty: ${src_files[@]}" + echo "Source files variable empty: " "${src_files[@]}" exit 1 fi @@ -206,8 +206,8 @@ function copy_files() { exit 1 fi - echo "Copying source files: ${src_files[@]} to Node ${dst_node}" - ${SCP_COMMAND} -i ${RSA_KEY_FILE} ${src_files[@]} core@${dst_node}:${dst_folder} + echo "Copying source files: " "${src_files[@]}" "to Node ${dst_node}" + ${SCP_COMMAND} -i ${RSA_KEY_FILE} "${src_files[@]}" core@${dst_node}:${dst_folder} } function check_external_access() { @@ -272,7 +272,7 @@ if ! ./verify.sh; then # Remote working echo ">> Copying files to the Edge-cluster ${edgecluster}" ${SSH_COMMAND} -i ${RSA_KEY_FILE} core@${EDGE_NODE_IP} "mkdir -p ~/manifests ~/.kube" - for _file in ${files[@]}; do + for _file in "${files[@]}"; do copy_files "${_file}" "${EDGE_NODE_IP}" "./manifests/" done copy_files "./manifests/*.yaml" "${EDGE_NODE_IP}" "./manifests/" diff --git a/hack/deploy-hub-local/lab-dns-external.sh b/hack/deploy-hub-local/lab-dns-external.sh index bfc508d5a..bde489120 100755 --- a/hack/deploy-hub-local/lab-dns-external.sh +++ b/hack/deploy-hub-local/lab-dns-external.sh @@ -137,7 +137,7 @@ function checks() { fi done - if [[ $fail > 0 ]];then + if [[ $fail -gt 0 ]];then echo "ERROR: DNS Configuration has issues, check before continue" exit 1 fi diff --git a/hack/deploy-hub-local/lab-dns-internal.sh b/hack/deploy-hub-local/lab-dns-internal.sh index a2b051f25..d60d8c8d6 100755 --- a/hack/deploy-hub-local/lab-dns-internal.sh +++ b/hack/deploy-hub-local/lab-dns-internal.sh @@ -90,7 +90,7 @@ function checks() { fi done - if [[ $fail > 0 ]];then + if [[ $fail -gt 0 ]];then echo "ERROR: DNS Configuration has issues, check before continue" exit 1 fi diff --git a/shared-utils/common.sh b/shared-utils/common.sh index 85178957b..6a7b26748 100755 --- a/shared-utils/common.sh +++ b/shared-utils/common.sh @@ -197,7 +197,7 @@ function copy_files_common() { dst_folder=${3} if [[ -z ${src_files} ]]; then - echo "Source files variable empty: ${src_files[@]}" + echo "Source files variable empty: " "${src_files[@]}" exit 1 fi @@ -216,8 +216,8 @@ function copy_files_common() { exit 1 fi - echo "Copying source files: ${src_files[@]} to Node ${dst_node}" - ${SCP_COMMAND} -i ${RSA_KEY_FILE} ${src_files[@]} core@${dst_node}:${dst_folder} + echo "Copying source files: " "${src_files[@]}" "to Node ${dst_node}" + ${SCP_COMMAND} -i ${RSA_KEY_FILE} "${src_files[@]}" core@${dst_node}:${dst_folder} } function grab_domain() {