aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2011-04-26 01:56:50 +0200
committermh <mh@immerda.ch>2011-04-26 01:56:50 +0200
commit9f218e8e4a835cf282f73a3463e478be9a104559 (patch)
tree32613841d23d9854e7df3cf91acb5e93bb6d508e
parentcfe9ef09911bace2287c21a4fb2449139e40df64 (diff)
downloadpuppet-monkeysphere-9f218e8e4a835cf282f73a3463e478be9a104559.tar.gz
puppet-monkeysphere-9f218e8e4a835cf282f73a3463e478be9a104559.tar.bz2
fix mail location on centos
-rw-r--r--manifests/init.pp6
1 files changed, 5 insertions, 1 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 991a8df..c71b3b7 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -48,8 +48,12 @@ class monkeysphere {
}
}
'mail': {
+ $mail_loc = $operatingsystem ? {
+ 'centos' => '/bin/mail',
+ default => '/usr/bin/mail',
+ }
exec { "/usr/sbin/monkeysphere-host import-key /etc/ssh/ssh_host_rsa_key $key && \
- /usr/bin/mail -s 'monkeysphere host pgp key for $fqdn' root < /var/lib/monkeysphere/host_keys.pub.pgp":
+ ${mail_loc} -s 'monkeysphere host pgp key for $fqdn' root < /var/lib/monkeysphere/host_keys.pub.pgp":
unless => "/usr/local/sbin/monkeysphere-check-key",
user => "root",
require => [ Package["monkeysphere"], File["/usr/local/sbin/monkeysphere-check-key"] ],