summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Haber <mh+puppet-concat@zugschlus.de>2012-11-06 10:31:54 +0100
committerMarc Haber <mh+puppet-concat@zugschlus.de>2012-11-06 10:54:35 +0100
commit8b3397bdd48756e72f0396223b30fe63b8cf978b (patch)
tree850c0d3f26295a99ed6e00e90e304c83d702ca77
parentab64af9dc5714c7775e97592d26aa7b94604697e (diff)
downloadpuppet-concat-8b3397bdd48756e72f0396223b30fe63b8cf978b.tar.gz
puppet-concat-8b3397bdd48756e72f0396223b30fe63b8cf978b.tar.bz2
gracefully handle \n in fragment resource name
-rw-r--r--manifests/fragment.pp4
1 files changed, 2 insertions, 2 deletions
diff --git a/manifests/fragment.pp b/manifests/fragment.pp
index 68bfd9b..cf55f8b 100644
--- a/manifests/fragment.pp
+++ b/manifests/fragment.pp
@@ -14,8 +14,8 @@
# - backup Controls the filebucketing behavior of the final file and
# see File type reference for its use. Defaults to 'puppet'
define concat::fragment($target, $content='', $source='', $order=10, $ensure = 'present', $mode = '0644', $owner = $::id, $group = $concat::setup::root_group, $backup = 'puppet') {
- $safe_name = regsubst($name, '/', '_', 'G')
- $safe_target_name = regsubst($target, '/', '_', 'G')
+ $safe_name = regsubst($name, '[/\n]', '_', 'GM')
+ $safe_target_name = regsubst($target, '[/\n]', '_', 'GM')
$concatdir = $concat::setup::concatdir
$fragdir = "${concatdir}/${safe_target_name}"