set sed and grep relative

This commit is contained in:
mh 2010-01-15 09:46:31 +01:00 committed by Micah Anderson
parent b4ce2e8769
commit 9a70828ea0

View file

@ -33,8 +33,8 @@ define line($file, $line, $ensure = 'present') {
}
absent: {
$subst_line = regsubst($line,'(/|\.)','\\\1','G')
exec { "/bin/sed -i '/${subst_line}/d' '${file}'":
onlyif => "/bin/grep -qFx '${line}' '${file}'"
exec { "sed -i '/${subst_line}/d' '${file}'":
onlyif => "grep -qFx '${line}' '${file}'"
}
}
}