~gandelman-a/ubuntu/precise/facter/merge922788

« back to all changes in this revision

Viewing changes to lib/facter/uptime_seconds.rb

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman
  • Date: 2011-10-18 10:32:42 UTC
  • mfrom: (1.1.10 upstream) (3.1.10 sid)
  • Revision ID: package-import@ubuntu.com-20111018103242-vvgvfa9pf057xnmj
Tags: 1.6.1-1ubuntu1
* Merge from Debian unstable (LP: #877621). Remaining changes:
  - debian/rules: use what we had in natty; we dont want ruby-pkg-tools
    in main. (LP: #408402)
* debian/control: Continue using ruby + libopenssl-ruby as Build-Depends
  even tho Debian has moved to gem2deb (not in main). Move ruby-json to
  Suggests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Fact: uptime_seconds
 
2
#
 
3
# Purpose: Return purely number of seconds of uptime.
 
4
#
 
5
# Resolution:
 
6
#   Using the 'facter/util/uptime.rb' module, try a verity of methods to acquire
 
7
#   the uptime on Unix.
 
8
#
 
9
#   On Windows, the module calculates the uptime by the "LastBootupTime" Windows
 
10
#   management value.
 
11
#
 
12
# Caveats:
 
13
#
 
14
 
1
15
require 'facter/util/uptime'
2
16
 
3
17
Facter.add(:uptime_seconds) do