enterprise-ohai 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,6 +10,10 @@ def disk_path(link)
10
10
  File.expand_path(File.join(dir, path))
11
11
  end
12
12
 
13
+ def disk_size(path)
14
+ %x{fdisk -lu #{path} 2>&1}[%r{^Disk #{path}: (.*),}, 1]
15
+ end
16
+
13
17
  disks = Mash.new
14
18
 
15
19
  by_path_root = '/dev/disk/by-path'
@@ -43,6 +47,8 @@ end
43
47
  disks.keys.each do |device|
44
48
  disks[device].update(filesystem[device]) if filesystem[device]
45
49
  disks[device].update(:swap => true) if swap[device]
50
+
51
+ disks[device].update(:size => disk_size(device))
46
52
  end
47
53
 
48
54
  disk disks
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enterprise-ohai
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - GitHub
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-09 00:00:00 -08:00
18
+ date: 2011-11-10 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency