Skip to content

Instantly share code, notes, and snippets.

@jcsalterego
Created August 16, 2010 18:50
Show Gist options
  • Select an option

  • Save jcsalterego/527516 to your computer and use it in GitHub Desktop.

Select an option

Save jcsalterego/527516 to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# Verbose adding of $DOMAIN to searches
#
# Ref: http://www.afp548.com/article.php?story=20050703052052393
DOMAIN='example.org';
DNS='State:/Network/Global/DNS';
echo "
get $DNS
d.show
d.add SupplementalMatchDomains * $DOMAIN
d.show
set $DNS
" | scutil;
@jcsalterego

Copy link
Copy Markdown
Author

This doesn't really work as you have to loop through State:/Network/Service/[^/]+/DNS and set SupplementalMatchDomains there, but it's a start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment