From 8f9ee10ae765efcba7cd00df39eeee16b8fb2622 Mon Sep 17 00:00:00 2001 From: arnili <34974144+arnili@users.noreply.github.com> Date: Fri, 21 Feb 2020 13:06:25 +0100 Subject: [PATCH] Fix duplicate check - too unspecific The check is too unspecific, it currently allows partial line matches. This prevents broader entries to be added after more specific ones. Example: after lancache.steamcontent.com is added, steamcontent.com will be wrongfully skipped. This change will make sure only exact duplicates are skipped. --- scripts/create-unbound.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/create-unbound.sh b/scripts/create-unbound.sh index 10ee026..37a90de 100755 --- a/scripts/create-unbound.sh +++ b/scripts/create-unbound.sh @@ -52,7 +52,7 @@ while read entry; do continue fi parsed=$(echo $fileentry | sed -e "s/^\*\.//") - if grep -q "$parsed" $outputfile; then + if grep -qx "$parsed" $outputfile; then continue fi echo " local-zone: \"${parsed}\" redirect" >> $outputfile