summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2015-04-08 17:55:51 +0200
committervarac <varacanero@zeromail.org>2015-04-08 17:55:51 +0200
commit300f1d39682d47e7bcc66b82f21dec15bb41b4e9 (patch)
treee4424fcbd21478c52ee370574205dae2980a2eba
parentaaf9e3df1c184c934f014f1003d8c2e2776b2b71 (diff)
parentd1ab33dbb66e09f9f8ff2cc61e3e8cc94fef3674 (diff)
Merge remote-tracking branch 'shared/master' into leap_master
Conflicts: manifests/defaults/commands.pp
-rw-r--r--files/pnp4nagios/apache.conf1
-rw-r--r--lib/facter/mountpoints.rb28
2 files changed, 16 insertions, 13 deletions
diff --git a/files/pnp4nagios/apache.conf b/files/pnp4nagios/apache.conf
index 8f66756..816bf05 100644
--- a/files/pnp4nagios/apache.conf
+++ b/files/pnp4nagios/apache.conf
@@ -27,4 +27,5 @@ Alias /pnp4nagios "/usr/share/pnp4nagios/html"
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT,L]
</IfModule>
+ DirectoryIndex index.php
</Directory>
diff --git a/lib/facter/mountpoints.rb b/lib/facter/mountpoints.rb
index c51e6e6..da2f2a9 100644
--- a/lib/facter/mountpoints.rb
+++ b/lib/facter/mountpoints.rb
@@ -12,21 +12,23 @@ begin
require 'filesystem'
rescue Exception => e
confine :kernel => :linux
- ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
- fs_source = nil
- if FileTest.exists?("/etc/mtab")
- fs_source = "/etc/mtab"
- elsif FileTest.exists?("/proc/mounts")
- fs_source = "/proc/mounts"
- end
+ setcode do
+ ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
+ fs_source = nil
+ if FileTest.exists?("/etc/mtab")
+ fs_source = "/etc/mtab"
+ elsif FileTest.exists?("/proc/mounts")
+ fs_source = "/proc/mounts"
+ end
- mounts = File.read(fs_source).split("\n")
- mounts.each do |mount|
- mount = mount.split(" ")
- if ((not ignorefs.include?(mount[2])) && (mount[3] !~ /bind/) && (not devices.include?(mount[0])) && (not mountpoints.include?(mount[1])))
- mountpoints.push(mount[1])
+ mounts = File.read(fs_source).split("\n")
+ mounts.each do |mount|
+ mount = mount.split(" ")
+ if ((not ignorefs.include?(mount[2])) && (mount[3] !~ /bind/) && (not devices.include?(mount[0])) && (not mountpoints.include?(mount[1])))
+ mountpoints.push(mount[1])
+ end
+ devices.push(mount[0]) if not devices.include?(mount[0])
end
- devices.push(mount[0]) if not devices.include?(mount[0])
end
else
FileSystem.mounts.each do |m|