]> git.donarmstrong.com Git - dsa-puppet.git/blob - facts/mounts.rb
5f3d3c12ec22ef4c25f45f540880b2419a229812
[dsa-puppet.git] / facts / mounts.rb
1 begin
2   require 'filesystem'
3 rescue Exception => e
4   exit 0
5 end
6
7 Facter.add("mounts") do
8         ignorefs = ["NFS", "nfs", "nfs4", "afs", "binfmt_misc", "proc", "smbfs", 
9                     "autofs", "iso9660", "ncpfs", "coda", "devpts", "ftpfs", "devfs", 
10                     "mfs", "shfs", "sysfs", "cifs", "lustre_lite", "tmpfs", "usbfs", "udf"]
11         mountpoints = []
12         FileSystem.mounts.each do |m|
13                 if ((not ignorefs.include?(m.fstype)) && (m.options !~ /bind/))
14                         mountpoints << m.mount
15                 end
16         end
17         setcode do
18                 mountpoints.join(',')
19         end
20 end
21