diff --git a/cdist/conf/type/__line/gencode-remote b/cdist/conf/type/__line/gencode-remote index b9f118b1..fa051951 100755 --- a/cdist/conf/type/__line/gencode-remote +++ b/cdist/conf/type/__line/gencode-remote @@ -60,6 +60,7 @@ case "$state_should" in # Only replace ' with '"'"' and keep \ as they are line_sanitised=$(cat "$__object/parameter/line" | sed -e "s/'/'\"'\"'/g") printf '%s' "printf '%s\n' '$line_sanitised' >> $file" + echo "added" >> "$__messages_out" ;; absent) @@ -83,9 +84,10 @@ fi grep -v $greparg '$regex' '$file' > \$tmpfile || true mv -f "\$tmpfile" "$file" eof + echo "removed" >> "$__messages_out" ;; *) - echo "Unknown state: $state_should" >&2 - exit 1 + echo "Unknown state: $state_should" >&2 + exit 1 ;; esac diff --git a/cdist/conf/type/__line/man.rst b/cdist/conf/type/__line/man.rst index e6adce9c..b63ea2b3 100644 --- a/cdist/conf/type/__line/man.rst +++ b/cdist/conf/type/__line/man.rst @@ -40,6 +40,13 @@ file If supplied, use this as the destination file. Otherwise the object_id is used. +MESSAGES +-------- +added + The line was added. + +removed + The line was removed. EXAMPLES --------