summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorDavid Schmitt <david@schmitt.edv-bus.at>2008-06-26 12:01:24 +0200
committerDavid Schmitt <david@schmitt.edv-bus.at>2008-06-26 12:01:24 +0200
commit07ebdfa2c59684e79b0a1904858c9072b47601c5 (patch)
tree98e766ea2e63462c2161cf483765bb0c445bb688 /manifests
parent7820051c671cf47043bb15ad646e32c6a73d61a6 (diff)
line: do a full string match of $line instead of a regex match
This allows $line to contain '/' characters and is generally the safer thing to do. Patch from Francois Deppierraz <francois.deppierraz@camptocamp.com>
Diffstat (limited to 'manifests')
-rw-r--r--manifests/defines/line.pp2
1 files changed, 1 insertions, 1 deletions
diff --git a/manifests/defines/line.pp b/manifests/defines/line.pp
index 2eb8f98..c055f5b 100644
--- a/manifests/defines/line.pp
+++ b/manifests/defines/line.pp
@@ -32,7 +32,7 @@ define line($file, $line, $ensure = 'present') {
}
}
absent: {
- exec { "perl -ni -e 'print unless /^\\Q${line}\\E\$/' '${file}'":
+ exec { "perl -ni -e 'print if \$_ ne \"${line}\n\";' '${file}'":
onlyif => "grep -qFx '${line}' '${file}'"
}
}