projects
/
mirror
/
dsa-puppet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3946232
)
A mounts fact. This will hopefully let us compare what we currently
author
Stephen Gran
<steve@lobefin.net>
Sat, 14 Mar 2009 20:32:22 +0000
(20:32 +0000)
committer
Stephen Gran
<steve@lobefin.net>
Sat, 14 Mar 2009 20:32:22 +0000
(20:32 +0000)
monitor to what is actually on the system
Signed-off-by: Stephen Gran <steve@lobefin.net>
facts/mounts.rb
[new file with mode: 0644]
patch
|
blob
diff --git a/facts/mounts.rb
b/facts/mounts.rb
new file mode 100644
(file)
index 0000000..
c1c6aab
--- /dev/null
+++ b/
facts/mounts.rb
@@ -0,0
+1,17
@@
+require 'filesystem'
+
+Facter.add("mounts") do
+ ignorefs = ["NFS", "nfs", "nfs4", "afs", "binfmt_misc", "proc", "smbfs",
+ "autofs", "iso9660", "ncpfs", "coda", "devpts", "ftpfs", "devfs",
+ "mfs", "shfs", "sysfs", "cifs", "lustre_lite", "tmpfs", "usbfs", "udf"]
+ mountpoints = []
+ FileSystem.mounts.each do |m|
+ if not ignorefs.include?(m.fstype) && m.options !~ /bind/
+ mountpoints << m.mount
+ end
+ end
+ setcode do
+ mountpoints.join(',')
+ end
+end
+