From cb2175d1c19f44cabbc8a3575b3091c832b1fc41 Mon Sep 17 00:00:00 2001 From: Blackyfff Date: Tue, 17 Aug 2021 22:41:20 +0200 Subject: [PATCH] fix: POSIX new line handling Signed-off-by: Blackyfff --- usr/lib/ffdns/update-dns.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr/lib/ffdns/update-dns.sh b/usr/lib/ffdns/update-dns.sh index ad24cfa..8636d17 100755 --- a/usr/lib/ffdns/update-dns.sh +++ b/usr/lib/ffdns/update-dns.sh @@ -68,8 +68,7 @@ UpdateExternal() { if [ -n "$ExternalView" ] || [ -n "$ExternDomain" ]; then SerialExtern="$(GetZoneFileSerial "$ExternalZoneFile")" if [ $((SerialIntern)) -gt $((SerialExtern)) ]; then - sed -e '/^[^;]*\s\(10\.\|[fF][cdCD][0-9a-fA-F]\{2\}:\)\S*\s*\(;.*\)\?$/d; \ - s/^[^;^@]*\s\+\([^;]*\)\s[Ii][Nn]\s\+[Ss][Oo][Aa]\s/@ \1 IN SOA /g' "$InternalZoneFile" \ + sed -e '/^[^;]*\s\(10\.\|[fF][cdCD][0-9a-fA-F]\{2\}:\)\S*\s*\(;.*\)\?$/d;s/^[^;^@]*\s\+\([^;]*\)\s[Ii][Nn]\s\+[Ss][Oo][Aa]\s/@ \1 IN SOA /g' "$InternalZoneFile" \ > "$ExternalZoneFile" UpdateExternView=1 ReloadZone "$InternalDomain" "$ExternalView" "$ZoneFilesFolder"