commit | 9275d850a21aa66d7fc5eba95cdaa030443ce08e | [log] [tgz] |
---|---|---|
author | William A. Kennington III <wak@google.com> | Fri Aug 26 14:38:02 2022 -0700 |
committer | William A. Kennington III <wak@google.com> | Fri Aug 26 14:38:29 2022 -0700 |
tree | d5997e4434617c8a8fe919593a3b8f9dbfd28d13 | |
parent | 13db037264af9d142663565bb9e11d039d92e999 [diff] |
meta-google: gbmc-bridge: Fix uptime reading We can't do floating point math so just chop it off. Change-Id: I7f78f05856d774236d6e9746b69b362b6468ca0a Signed-off-by: William A. Kennington III <wak@google.com>
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 c43647c..4cc0f6e 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
@@ -62,6 +62,8 @@ # If the process is running, give it at least 5 minutes from when it started cur_s="$(cut -d' ' -f1 /proc/uptime)" + # Remove floating point if applied since bash can't perform float arithmetic + cur_s="${cur_s%.*}" if [[ "$activestr" == 'active' ]]; then active_ms="$(echo "$json" | jq -r '.data[0].ActiveEnterTimestampMonotonic.data')" else