From 6b837f80ff06e079111b67f3831047e50c36df78 Mon Sep 17 00:00:00 2001 From: William Wernert Date: Tue, 12 May 2020 14:26:02 -0400 Subject: [PATCH] [fix] numeric argument required, return 0 in wait_for_file --- setup/so-functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/so-functions b/setup/so-functions index 8fb6cae7e..7d6aca05f 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -94,7 +94,7 @@ wait_for_file() { while [[ $cur_attempts < $max_attempts ]]; do if [ -f "$filename" ]; then echo "File $filename already exists at $date" >> "$setup_log" 2>&1 - return + return 0 else echo "File $filename does not exist; waiting ${wait_interval}s then checking again ($cur_attempts/$max_attempts)..." >> "$setup_log" 2>&1 ((cur_attempts++)) @@ -198,7 +198,7 @@ check_hive_init_then_reboot() { local return_val return_val="$(wait_for_file /opt/so/state/thehive.txt 20 5)" - if [[ $return_val != 0 ]]; then + if [[ "$return_val" != 0 ]]; then return "$return_val" fi