aboutsummaryrefslogtreecommitdiff
path: root/lib/facter/disks.rb
blob: d6dd66531a4eb42c7f3d0b1e2d4a3931175ccd83 (plain)
1
2
3
4
5
6
7
# return the list of disks
Facter.add("disks") do
  confine :kernel => :linux
  setcode do
    `egrep '[sh]d[a-z]+$' /proc/partitions 2> /dev/null | awk '{ print $4 }' | xargs`.split(' ')
  end
end