From 1cf285a91d82461cbca33b35527a0eb30ba12e29 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 25 Mar 2010 23:01:03 -0300 Subject: Configuring smart plugin, adding disks fact and adding package gitk on utils::desktop --- lib/facter/disks.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 lib/facter/disks.rb (limited to 'lib/facter/disks.rb') diff --git a/lib/facter/disks.rb b/lib/facter/disks.rb new file mode 100644 index 0000000..60975e5 --- /dev/null +++ b/lib/facter/disks.rb @@ -0,0 +1,7 @@ +# return the list of disks +Facter.add("disks") do + confine :kernel => :linux + setcode do + `egrep '[sh]d[a-z]+$' /proc/partitions | awk '{ print $4 }' | xargs`.split(' ') + end +end -- cgit v1.2.3