From 355e4850845a0d2a734bca2c4fe47e58ac9f9324 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Fri, 10 Apr 2015 23:24:54 -0400 Subject: [PATCH] another attempt to get the uptime right. --- scripts/core/inventory.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/core/inventory.sh b/scripts/core/inventory.sh index 55212f9c..647f943a 100644 --- a/scripts/core/inventory.sh +++ b/scripts/core/inventory.sh @@ -18,10 +18,11 @@ fi # test if this uptime knows the -p flag. uptime -p &>/dev/null +errorfudgetime if [ $? -eq 0 ]; then up="$(uptime -p)" else - up="up $(uptime)" + up="$(uptime | awk '{print $2 " " $1 }')" fi echo -- 2.34.1