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