puppetlabs/facter — pull request #333 by jeffmccune (2012-10-15 22:42:26+00:00)
Title: (#13535) Fix uptime; use `uptime` instead of `who -b`

Without this patch applied the uptime fact value is often wrong on some
flavors of Unix. In particular, the value may be negative or simply
incorrect.

This is a problem because the Facter value does not contained the truth
of our reality. This makes it difficult to model reality inside of
Puppet.

This patch fixes the problem by replacing the unreliable who -b method
and the Solaris kstat method with a simple call to the
"uptime" command.

This patch also adds RSpec tests for new method and remove RSpec tests
for removed methods. Delete now-unused fixture file who_b_boottime.

Reviewed-by: Jeff McCune