Also checking "" in order to detect manually chunked record

And removing brackets, since they are not necessary when whole record is in one line
This commit is contained in:
dpeca 2020-08-23 19:44:12 +02:00 committed by GitHub
parent 311827c4b3
commit ef0f62a59b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -417,7 +417,7 @@ update_domain_zone() {
txtlength=${#VALUE} txtlength=${#VALUE}
if [ $txtlength -gt 255 ]; then if [ $txtlength -gt 255 ]; then
already_chunked=0 already_chunked=0
if [[ $VALUE == *"\" \""* ]]; then if [[ $VALUE == *"\" \""* ]] || [[ $VALUE == *"\"\""* ]]; then
already_chunked=1 already_chunked=1
fi fi
if [ $already_chunked -eq 0 ]; then if [ $already_chunked -eq 0 ]; then
@ -425,9 +425,7 @@ update_domain_zone() {
txtlength=$(( $txtlength - 2 )) txtlength=$(( $txtlength - 2 ))
VALUE=${VALUE:1:txtlength} VALUE=${VALUE:1:txtlength}
fi fi
VALUE=$(echo $VALUE | fold -w 255 | xargs -I '$' echo -n ' "$"') VALUE=$(echo $VALUE | fold -w 255 | xargs -I '$' echo -n '"$"')
VALUE=${VALUE:1}
VALUE="($VALUE)"
fi fi
fi fi
fi fi