diff options
author | William A. Kennington III <wak@google.com> | 2022-08-27 00:38:02 +0300 |
---|---|---|
committer | William A. Kennington III <wak@google.com> | 2022-08-27 00:38:29 +0300 |
commit | 9275d850a21aa66d7fc5eba95cdaa030443ce08e (patch) | |
tree | d5997e4434617c8a8fe919593a3b8f9dbfd28d13 /meta-google | |
parent | 13db037264af9d142663565bb9e11d039d92e999 (diff) | |
download | openbmc-9275d850a21aa66d7fc5eba95cdaa030443ce08e.tar.xz |
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>
Diffstat (limited to 'meta-google')
-rw-r--r-- | meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp-term.sh | 2 |
1 files changed, 2 insertions, 0 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 c43647ca6a..4cc0f6ee4e 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 @@ while true; do # 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 |