Use yes rather than random text.
[openresolv] / unbound.in
index be70a9d89c8996f2ebd1521a0fe0ccb43c6691b6..124cecf624edba1c426ded73851dde7421d5a085 100644 (file)
@@ -43,9 +43,11 @@ newconf="# Generated by resolvconf$NL"
 for d in $DOMAINS; do
        dn="${d%%:*}"
        ns="${d#*:}"
-       if [ -n "$unbound_insecure" ]; then
+       case "$unbound_insecure" in
+       [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
                newconf="$newconf${NL}domain-insecure: \"$dn\""
-       fi
+               ;;
+       esac
        newconf="$newconf${NL}forward-zone:$NL  name: \"$dn\"$NL"
        while [ -n "$ns" ]; do
                newconf="$newconf       forward-addr: ${ns%%,*}$NL"