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