Fixed generic uptime fact
James Turnbull
15 years ago
1 | 1 |
Fixed #1926 - IPAddr to_s issue
|
2 | 2 |
|
3 | 3 |
Fixed Ubuntu operatingsystem identification
|
|
4 |
|
|
5 |
Fixed generic uptime fact
|
4 | 6 |
|
5 | 7 |
1.5.3:
|
6 | 8 |
Added network fact
|
5 | 5 |
time = Facter::Util::Resolution.exec('uptime')
|
6 | 6 |
if time =~ /up\s*(\d+\s\w+)/
|
7 | 7 |
$1
|
|
8 |
elsif time =~ /up\s*(\d+:\d+)/
|
|
9 |
$1 + " hours"
|
8 | 10 |
else
|
9 | 11 |
"unknown"
|
10 | 12 |
end
|