diff options
| author | Rein Henrichs <rein@puppetlabs.com> | 2010-08-25 12:02:22 -0700 |
|---|---|---|
| committer | Rein Henrichs <rein@puppetlabs.com> | 2010-08-25 12:02:22 -0700 |
| commit | 244745eb7fb493e2efa535d5482ed6d8db81dda0 (patch) | |
| tree | 59e6960d32581b6c948bead746ec1fd6ae6c9b98 | |
| parent | fca886136ab103bba5aa851687f7f97a6b95f8bd (diff) | |
| parent | 3671c9fce6cd6bbedf206f9c1c3611468b7887da (diff) | |
Merge branch 'ticket/master/4583'
| -rw-r--r-- | lib/facter/util/uptime.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/facter/util/uptime.rb b/lib/facter/util/uptime.rb index 6c60ace..9a59d30 100644 --- a/lib/facter/util/uptime.rb +++ b/lib/facter/util/uptime.rb @@ -19,19 +19,19 @@ module Facter::Util::Uptime 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 |
