# File lib/facter/selinux.rb, line 69 def selinux_mount_point path = "/selinux" if FileTest.exists?('/proc/self/mounts') # Centos 5 shows an error in which having ruby use File.read to read # /proc/self/mounts combined with the puppet agent run with --listen causes # a hang. Reading from other parts of /proc does not seem to cause this problem. # The work around is to read the file in another process. # -- andy Fri Aug 31 2012 selinux_line = Facter::Core::Execution.exec('cat /proc/self/mounts').each_line.find { |line| line =~ /selinuxfs/ } if selinux_line path = selinux_line.split[1] end end path end