Skip to content

Commit

Permalink
Merge branch 'ticket/master/4583'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rein Henrichs committed Aug 25, 2010
2 parents fca8861 + 3671c9f commit 244745e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/facter/util/uptime.rb
Expand Up @@ -19,19 +19,19 @@ def self.get_uptime_seconds_win
private

def self.uptime_proc_uptime
if output = `/bin/cat #{uptime_file} 2>/dev/null` and $?.success?
if output = Facter::Util::Resolution.exec("/bin/cat #{uptime_file} 2>/dev/null")
output.chomp.split(" ").first.to_i
end
end

def self.uptime_sysctl
if output = `#{uptime_sysctl_cmd} 2>/dev/null` and $?.success?
if output = Facter::Util::Resolution.exec("#{uptime_sysctl_cmd} 2>/dev/null")
compute_uptime(Time.at(output.unpack('L').first))
end
end

def self.uptime_who_dash_b
if output = `#{uptime_who_cmd} 2>/dev/null` and $?.success?
if output = Facter::Util::Resolution.exec("#{uptime_who_cmd} 2>/dev/null")
compute_uptime(Time.parse(output))
end
end
Expand Down

0 comments on commit 244745e

Please sign in to comment.