diff options
3 files changed, 10 insertions, 8 deletions
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp-term.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp-term.sh index 46bf136049..1ba0ac3c42 100644 --- a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp-term.sh +++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp-term.sh @@ -42,7 +42,7 @@ while true; do # Ensure we only complete the addr lookup loop every 10s tosleep=$((before + 10 - SECONDS)) if (( tosleep > 0 )); then - sleep $tosleep + sleep "$tosleep" fi done @@ -99,7 +99,7 @@ while true; do w=$((active_ms/1000/1000 + (wait_min*60) - cur_s)) [ "$w" -lt 0 ] && break echo "Waiting ${w}s for DHCP process" >&2 - sleep $w + sleep "$w" done echo "Stopping DHCP processing" >&2 diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-lib.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-lib.sh index 7ccee8e611..d3bf95d89b 100644 --- a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-lib.sh +++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-lib.sh @@ -128,6 +128,7 @@ gbmc_br_set_ip() { } gbmc_br_lib_init=1 -return 0 2>/dev/null -echo "gbmc-br-lib is a library, not executed directly" >&2 -exit 1 +if ! (return 0 2>/dev/null); then + echo "gbmc-br-lib is a library, not executed directly" >&2 + exit 1 +fi diff --git a/meta-google/recipes-google/networking/network-sh/lib.sh b/meta-google/recipes-google/networking/network-sh/lib.sh index e4acc673b8..1d217c23f9 100644 --- a/meta-google/recipes-google/networking/network-sh/lib.sh +++ b/meta-google/recipes-google/networking/network-sh/lib.sh @@ -289,6 +289,7 @@ normalize_ip() { } network_init=1 -return 0 2>/dev/null -echo "network is a library, not executed directly" >&2 -exit 1 +if ! (return 0 2>/dev/null); then + echo "network is a library, not executed directly" >&2 + exit 1 +fi |