forked from ungleich-public/cdist
Merge branch 'type/__postfix' of git://github.com/asteven/cdist
This commit is contained in:
commit
9ded11daf0
1 changed files with 2 additions and 0 deletions
|
@ -42,6 +42,8 @@ remove_entry() {
|
||||||
suffix="#/cdist:$__object_name"
|
suffix="#/cdist:$__object_name"
|
||||||
cat << DONE
|
cat << DONE
|
||||||
tmpfile=\$(mktemp ${config}.cdist.XXXXXXXXXX)
|
tmpfile=\$(mktemp ${config}.cdist.XXXXXXXXXX)
|
||||||
|
# preserve ownership and permissions of existing file
|
||||||
|
cp -p "$config" "\$tmpfile"
|
||||||
awk -v prefix="$prefix" -v suffix="$suffix" '
|
awk -v prefix="$prefix" -v suffix="$suffix" '
|
||||||
{
|
{
|
||||||
if (index(\$0,prefix)) {
|
if (index(\$0,prefix)) {
|
||||||
|
|
Loading…
Reference in a new issue