]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Really, try not to die, you silly thing
authorStephen Gran <steve@lobefin.net>
Sat, 14 Mar 2009 22:13:46 +0000 (22:13 +0000)
committerStephen Gran <steve@lobefin.net>
Sat, 14 Mar 2009 22:13:46 +0000 (22:13 +0000)
Signed-off-by: Stephen Gran <steve@lobefin.net>
facts/mounts.rb

index 8e7db18db88fa217c952c4b1e711d90f8b35fa1d..1ff9cbf8905a87fae64fdc98ee05c65fb029497e 100644 (file)
@@ -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