gracefully handle \n in fragment resource name
This commit is contained in:
parent
ab64af9dc5
commit
8b3397bdd4
1 changed files with 2 additions and 2 deletions
|
@ -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}"
|
||||
|
||||
|
|
Loading…
Reference in a new issue