summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authordavid <david@f03ff2f1-f02d-0410-970d-b9634babeaa1>2007-08-07 11:42:33 +0000
committerdavid <david@f03ff2f1-f02d-0410-970d-b9634babeaa1>2007-08-07 11:42:33 +0000
commit9b9856b60e823a431e9ea06b42da64c231eeef36 (patch)
tree793bf4dd47ba614088c6d3242c1081b236bcf3ba /manifests
parent5c3b366b7b1d4347b3a596019a50482b849d16a6 (diff)
fix "fail on no ntp_ plugins" bug
git-svn-id: http://club.black.co.at:82/svn/manifests/trunk@176 f03ff2f1-f02d-0410-970d-b9634babeaa1
Diffstat (limited to 'manifests')
-rw-r--r--manifests/defines/concatenated_file.pp11
1 files changed, 10 insertions, 1 deletions
diff --git a/manifests/defines/concatenated_file.pp b/manifests/defines/concatenated_file.pp
index e701469..865a1ee 100644
--- a/manifests/defines/concatenated_file.pp
+++ b/manifests/defines/concatenated_file.pp
@@ -36,7 +36,16 @@ define concatenated_file (
}
# if there is a header or footer file, add it
- $additional_cmd = "$header$footer" ? { '' => '', default => "| cat '${header}' - '${footer}' " }
+ $additional_cmd = "$header" ? {
+ '' => $footer ? {
+ '' => '',
+ default => "| cat - '${footer}' "
+ },
+ default => $footer ? {
+ '' => "| cat '${header}' - ",
+ default => "| cat '${header}' - '${footer}' "
+ }
+ }
# use >| to force clobbering the target file
exec { "/usr/bin/find ${dir} -maxdepth 1 -type f ! -name '*puppettmp' -print0 | sort -z | xargs -0 cat ${header_cmd} >| ${name}.puppettmp":