set sed and grep relative
This commit is contained in:
parent
b4ce2e8769
commit
9a70828ea0
1 changed files with 2 additions and 2 deletions
|
@ -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}'"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue