another attempt to get the uptime right.
authorChris Koeritz <fred@gruntose.com>
Sat, 11 Apr 2015 03:24:54 +0000 (23:24 -0400)
committerChris Koeritz <fred@gruntose.com>
Sat, 11 Apr 2015 03:24:54 +0000 (23:24 -0400)
scripts/core/inventory.sh

index 55212f9ce7e7c0de3a15336634711020677d3b20..647f943ac3bdd8e0686f392a7deef2fb0b5a28a2 100644 (file)
@@ -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