From 8aacbe288593198b7ffb0733b5bcf98ce1a596be Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 19 Aug 2013 22:15:16 +0200 Subject: [PATCH] Bourne is not bash see http://shebang.brandonmintern.com/bourne-is-not-bash-or-read-echo-and-backslash/ Signed-off-by: Steven Armstrong --- cdist/conf/type/__key_value/gencode-remote | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cdist/conf/type/__key_value/gencode-remote b/cdist/conf/type/__key_value/gencode-remote index 5fa24d5b..c1a6bca8 100755 --- a/cdist/conf/type/__key_value/gencode-remote +++ b/cdist/conf/type/__key_value/gencode-remote @@ -46,7 +46,8 @@ case "$state_should" in ;; wrongvalue) # change exisiting value - echo "sed \"s|^$key\($delimiter\+\).*|$key\1$value|\" \"$file\" > \"$file.cdist-tmp\"" + printf 'sed "s|^%s\(%s\+\).*|%s\\1%s|" "%s" > "%s.cdist-tmp"\n' \ + "$key" "$delimiter" "$key" "$value" "$file" "$file" echo "mv \"$file.cdist-tmp\" \"$file\"" ;; *)