From 51c96624750a39c3498bc742b67d4ede5ac3cf18 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 21 Jan 2014 16:41:34 +0100 Subject: [PATCH 1/2] DO NOT USE ECHO WHEN SOMETHING MAY CONTAIN A B-A-C-K-S-L-A-S-H Signed-off-by: Nico Schottelius --- cdist/conf/type/__line/gencode-remote | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cdist/conf/type/__line/gencode-remote b/cdist/conf/type/__line/gencode-remote index d4796965..1fadf454 100755 --- a/cdist/conf/type/__line/gencode-remote +++ b/cdist/conf/type/__line/gencode-remote @@ -58,7 +58,7 @@ case "$state_should" in # Only replace ' with '"'"' and keep \ as they are line_sanitised=$(cat "$__object/parameter/line" | sed -e "s/'/'\"'\"'/g") - echo "printf '%s\n' '$line_sanitised' >> $file" + printf '%s' "printf '%s\n' '$line_sanitised' >> $file" ;; absent) From 520bcc29a79b7173dcd5c505e94a3a3a173210cb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 21 Jan 2014 16:43:02 +0100 Subject: [PATCH 2/2] ++changes Signed-off-by: Nico Schottelius --- docs/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog b/docs/changelog index 74220980..242f92b0 100644 --- a/docs/changelog +++ b/docs/changelog @@ -9,6 +9,7 @@ Changelog * Core: Add environment variable to select shell for executing scripts (Daniel Heule) * Explorer hostname: Return host name by using uname -n * New Type: __hostname (Steven Armstrong) + * Type __line: Use printf instead of echo for printing user input 3.0.2: 2014-01-19 * Documentation: Document all messages sent by types (Daniel Heule)