diff options
author | James Turnbull <james@lovedthanlost.net> | 2009-02-28 03:05:23 +1100 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-02-28 03:05:23 +1100 |
commit | 0e467869f4d427a8c42e1c2ff6a0bb215f288b09 (patch) | |
tree | 6dbd1b258a6a400184a567021a8774ce770d89f1 /lib/puppet/util/selinux.rb | |
parent | 417023835fb5d175fef3b6a06591a8170a5f81a4 (diff) | |
download | puppet-0e467869f4d427a8c42e1c2ff6a0bb215f288b09.tar.gz puppet-0e467869f4d427a8c42e1c2ff6a0bb215f288b09.tar.xz puppet-0e467869f4d427a8c42e1c2ff6a0bb215f288b09.zip |
Fixed #1963 - Failing to read /proc/mounts for selinux kills file downloads
Diffstat (limited to 'lib/puppet/util/selinux.rb')
-rw-r--r-- | lib/puppet/util/selinux.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/puppet/util/selinux.rb b/lib/puppet/util/selinux.rb index 70f244507..cd3b2ac1a 100644 --- a/lib/puppet/util/selinux.rb +++ b/lib/puppet/util/selinux.rb @@ -153,7 +153,9 @@ module Puppet::Util::SELinux # Internal helper function to read and parse /proc/mounts def read_mounts begin - mounts = File.read("/proc/mounts") + mountfh = File.open("/proc/mounts", NONBLOCK) + mounts = mountfh.read + mountfh.close rescue return nil end |