ruby-ipmitool 0.3 → 0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/ruby-ipmitool.rb +7 -3
- metadata +4 -4
data/lib/ruby-ipmitool.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'ping' if RUBY_VERSION.split('.')[1].to_i <= 8
|
2
|
-
|
3
1
|
module Kernel
|
4
2
|
private
|
5
3
|
def this_method_name
|
@@ -49,7 +47,13 @@ class Ipmitool
|
|
49
47
|
|
50
48
|
#Run a ping check to see if the host is responding
|
51
49
|
def check_host
|
52
|
-
|
50
|
+
result = `ping -q -c 2 #{@conn[:host]}`
|
51
|
+
if ($?.exitstatus == 0) do
|
52
|
+
pingable = true
|
53
|
+
else
|
54
|
+
pingable = false
|
55
|
+
end
|
56
|
+
pingable
|
53
57
|
end
|
54
58
|
|
55
59
|
#Read sensor data from ipmitool and return a hash containing the value
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-ipmitool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: "0.
|
8
|
+
- 4
|
9
|
+
version: "0.4"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Eugene Howe
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-
|
17
|
+
date: 2011-05-03 00:00:00 Z
|
18
18
|
dependencies: []
|
19
19
|
|
20
20
|
description: Wraps most fucntionality of ipmitool including user, sensor, channel, and chassis functions
|