fix: POSIX new line handling

Signed-off-by: Blackyfff <freifunk@freifunk-herpf.de>
This commit is contained in:
Blackyfff 2021-08-17 22:41:20 +02:00
parent aefc5a5b00
commit cb2175d1c1
1 changed files with 1 additions and 2 deletions

View File

@ -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"