From 4f21af66dffa7e87dce6d816832f2eee823253a2 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sat, 14 Mar 2009 22:13:46 +0000 Subject: [PATCH] Really, try not to die, you silly thing Signed-off-by: Stephen Gran --- facts/mounts.rb | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/facts/mounts.rb b/facts/mounts.rb index 8e7db18d..1ff9cbf8 100644 --- a/facts/mounts.rb +++ b/facts/mounts.rb @@ -1,21 +1,20 @@ begin require 'filesystem' -rescue Exception => e - return 0 -end -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 + 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 - setcode do - mountpoints.join(',') - end -end +rescue Exception => e +end -- 2.39.2