diff options
author | root <root@puppetmaster.black.co.at> | 2007-11-13 10:44:07 +0100 |
---|---|---|
committer | root <root@puppetmaster.black.co.at> | 2007-11-13 10:44:07 +0100 |
commit | 9d7a47506c6d824d254774f2c7828e8cb65e236f (patch) | |
tree | 3e8d1711b596671de8065592b50138ba4f22c6de /manifests/defines/line.pp | |
parent | 76483492e6e307e0591a45e87f8370e58d340529 (diff) |
common: minor improvements to config_file, replace and line
Diffstat (limited to 'manifests/defines/line.pp')
-rw-r--r-- | manifests/defines/line.pp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/manifests/defines/line.pp b/manifests/defines/line.pp index 4cf8fba..3f7c4c0 100644 --- a/manifests/defines/line.pp +++ b/manifests/defines/line.pp @@ -28,12 +28,12 @@ define line($file, $line, $ensure = 'present') { default : { err ( "unknown ensure value '${ensure}'" ) } present: { exec { "/bin/echo '${line}' >> '${file}'": - unless => "/bin/grep -Fx '${line}' '${file}'" + unless => "/bin/grep -qFx '${line}' '${file}'" } } absent: { exec { "/usr/bin/perl -ni -e 'print unless /^\\Q${line}\\E\$/' '${file}'": - onlyif => "/bin/grep -Fx '${line}' '${file}'" + onlyif => "/bin/grep -qFx '${line}' '${file}'" } } } |