Permalink
Browse files

If there is a default domain, skip that. Don't add it as an exception.

  • Loading branch information...
1 parent 813c578 commit 0123713679b113deb18057d3930b456d1035ecfa @jedisct1 jedisct1 committed Aug 7, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/exceptions-add.sh
@@ -23,10 +23,15 @@ name_servers=$(get_dhcp_dns || get_gw)
[ x"$name_servers" = 'x' ] && exit 0
-mkdir -p "$RESOLVER_DIR" || exit 1
+default_domain=$(./get-current-default-domain.sh)
+mkdir -p "$RESOLVER_DIR" || exit 1
name_server="$gw"
for domain in $DOMAINS_EXCEPTIONS; do
+ if [ x"$default_domain" != 'x' ]; then
+ echo "$domain" | grep -c ".*${default_domain}" > /dev/null
+ [ $? = 0 ] && continue
+ fi
echo '# automatically generated by the dnscrypt user interface' \
> "${RESOLVER_DIR}/${domain}"
for name_server in $name_servers; do

0 comments on commit 0123713

Please sign in to comment.