summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/plugin.pp6
-rw-r--r--manifests/plugin/deploy.pp6
2 files changed, 11 insertions, 1 deletions
diff --git a/manifests/plugin.pp b/manifests/plugin.pp
index 51de48a..9f799aa 100644
--- a/manifests/plugin.pp
+++ b/manifests/plugin.pp
@@ -35,7 +35,11 @@ define munin::plugin (
require => $real_require,
notify => Service['munin-node'];
}
-
+ if ($::selinux == 'true') and (($::operatingsystem != 'CentOS') or ($::operatingsystem == 'CentOS' and $::lsbmajdistrelease != '5')){
+ File[$plugin]{
+ seltype => 'munin_etc_t',
+ }
+ }
}
}
case $config {
diff --git a/manifests/plugin/deploy.pp b/manifests/plugin/deploy.pp
index 7de8d45..5003153 100644
--- a/manifests/plugin/deploy.pp
+++ b/manifests/plugin/deploy.pp
@@ -15,6 +15,12 @@ define munin::plugin::deploy($source = '', $ensure = 'present', $config = '') {
mode => 0755, owner => root, group => 0;
}
+ if ($::selinux == 'true') and (($::operatingsystem != 'CentOS') or ($::operatingsystem == 'CentOS' and $::lsbmajdistrelease != '5')){
+ File["munin_plugin_${name}"]{
+ seltype => 'munin_exec_t',
+ }
+ }
+
case $::kernel {
openbsd: { $basic_require = File['/var/run/munin'] }
default: { $basic_require = Package['munin-node'] }