|
|
@ -60,6 +60,7 @@ case "$state_should" in |
|
|
|
# Only replace ' with '"'"' and keep \ as they are |
|
|
|
# Only replace ' with '"'"' and keep \ as they are |
|
|
|
line_sanitised=$(cat "$__object/parameter/line" | sed -e "s/'/'\"'\"'/g") |
|
|
|
line_sanitised=$(cat "$__object/parameter/line" | sed -e "s/'/'\"'\"'/g") |
|
|
|
printf '%s' "printf '%s\n' '$line_sanitised' >> $file" |
|
|
|
printf '%s' "printf '%s\n' '$line_sanitised' >> $file" |
|
|
|
|
|
|
|
echo "added" >> "$__messages_out" |
|
|
|
|
|
|
|
|
|
|
|
;; |
|
|
|
;; |
|
|
|
absent) |
|
|
|
absent) |
|
|
@ -83,9 +84,10 @@ fi |
|
|
|
grep -v $greparg '$regex' '$file' > \$tmpfile || true |
|
|
|
grep -v $greparg '$regex' '$file' > \$tmpfile || true |
|
|
|
mv -f "\$tmpfile" "$file" |
|
|
|
mv -f "\$tmpfile" "$file" |
|
|
|
eof |
|
|
|
eof |
|
|
|
|
|
|
|
echo "removed" >> "$__messages_out" |
|
|
|
;; |
|
|
|
;; |
|
|
|
*) |
|
|
|
*) |
|
|
|
echo "Unknown state: $state_should" >&2 |
|
|
|
echo "Unknown state: $state_should" >&2 |
|
|
|
exit 1 |
|
|
|
exit 1 |
|
|
|
;; |
|
|
|
;; |
|
|
|
esac |
|
|
|
esac |
|
|
|