summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2009-02-03 22:20:59 +1100
committerJames Turnbull <james@lovedthanlost.net>2009-02-03 22:20:59 +1100
commit4dcd0128f8ef4096a30708abeb72d113015a7065 (patch)
tree5e37630ddd114eb1ce7c28f8d39b7fad65d8bae6 /lib
parentd93ca69ddf5194438f06a770dcde943c0f0b635d (diff)
downloadfacter-4dcd0128f8ef4096a30708abeb72d113015a7065.tar.gz
facter-4dcd0128f8ef4096a30708abeb72d113015a7065.tar.xz
facter-4dcd0128f8ef4096a30708abeb72d113015a7065.zip
Fixed generic uptime fact
Diffstat (limited to 'lib')
-rw-r--r--lib/facter/util/uptime.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/facter/util/uptime.rb b/lib/facter/util/uptime.rb
index 7c53b2c..1be3b98 100644
--- a/lib/facter/util/uptime.rb
+++ b/lib/facter/util/uptime.rb
@@ -6,6 +6,8 @@ module Facter::Util::Uptime
time = Facter::Util::Resolution.exec('uptime')
if time =~ /up\s*(\d+\s\w+)/
$1
+ elsif time =~ /up\s*(\d+:\d+)/
+ $1 + " hours"
else
"unknown"
end