From: Michael Tremer Date: Thu, 9 Apr 2020 20:24:42 +0000 (+0000) Subject: unbound: skip empty domains at local-data import X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=5947f92a5ace259bf517d597fa21e4c912574651 unbound: skip empty domains at local-data import Signed-off-by: Arne Fitzenreiter --- diff --git a/src/initscripts/system/unbound b/src/initscripts/system/unbound index 35477ae281..acbf6f5b52 100644 --- a/src/initscripts/system/unbound +++ b/src/initscripts/system/unbound @@ -78,10 +78,11 @@ write_hosts_conf() { while IFS="," read -r enabled address hostname domainname generateptr; do [ "${enabled}" = "on" ] || continue - echo "${domainname}" - done < /var/ipfire/main/hosts | sort -u | while read -r domainname; do + # Skip empty domainnames + [ "${domainname}" = "" ] && continue + echo "local-zone: ${domainname} typetransparent" - done + done < /var/ipfire/main/hosts | sort -u # Add all hosts while IFS="," read -r enabled address hostname domainname generateptr; do