From 5947f92a5ace259bf517d597fa21e4c912574651 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 9 Apr 2020 20:24:42 +0000 Subject: [PATCH] unbound: skip empty domains at local-data import Signed-off-by: Arne Fitzenreiter --- src/initscripts/system/unbound | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 2.39.2