diff options
author | Marc Fournier <marc.fournier@camptocamp.com> | 2009-08-28 09:15:19 +0200 |
---|---|---|
committer | Marc Fournier <marc.fournier@camptocamp.com> | 2009-08-28 09:15:19 +0200 |
commit | e597522fbf605400988726f1ccbc80d60b1de39b (patch) | |
tree | 7e3d4a0046c89a384cd739031cf077bdb5489b32 /manifests/definitions/hash.pp | |
parent | dfc16f3a462756387fbb07f0097337ad7e9978b1 (diff) | |
download | puppet-postfix-e597522fbf605400988726f1ccbc80d60b1de39b.tar.gz puppet-postfix-e597522fbf605400988726f1ccbc80d60b1de39b.tar.bz2 |
postfix: selinux labels differ from one distribution to another
Diffstat (limited to 'manifests/definitions/hash.pp')
-rw-r--r-- | manifests/definitions/hash.pp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/manifests/definitions/hash.pp b/manifests/definitions/hash.pp index 2ecbff8..e012458 100644 --- a/manifests/definitions/hash.pp +++ b/manifests/definitions/hash.pp @@ -1,8 +1,24 @@ define postfix::hash ($ensure) { + + case $operatingsystem { + + RedHat: { + case $lsbmajdistrelease { + "4": { $postfix_seltype = "etc_t" } + "5": { $postfix_seltype = "postfix_etc_t" } + default: { $postfix_seltype = undef } + } + } + + default: { + $postfix_seltype = undef + } + } + file {"${name}": ensure => $ensure, mode => 600, - seltype => "postfix_etc_t", + seltype => $postfix_seltype, require => Package["postfix"], } @@ -10,7 +26,7 @@ define postfix::hash ($ensure) { ensure => $ensure, mode => 600, require => [File["${name}"], Exec["generate ${name}.db"]], - seltype => "postfix_etc_t", + seltype => $postfix_seltype, } exec {"generate ${name}.db": |