aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-03-25 23:01:03 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-03-25 23:01:03 -0300
commit1cf285a91d82461cbca33b35527a0eb30ba12e29 (patch)
tree990a1dbb8fd74bda66642bcf3db6634f78175be3 /lib
parentcb1b6bfb20ace930621f224327f456a585e6e01c (diff)
downloadpuppet-nodo-1cf285a91d82461cbca33b35527a0eb30ba12e29.tar.gz
puppet-nodo-1cf285a91d82461cbca33b35527a0eb30ba12e29.tar.bz2
Configuring smart plugin, adding disks fact and adding package gitk on utils::desktop
Diffstat (limited to 'lib')
-rw-r--r--lib/facter/disks.rb7
1 files changed, 7 insertions, 0 deletions
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