| 388 | # === resolv.conf handling via networksetup (OSX [Snow Leopard])) ========= |
| 389 | |
| 390 | modify_resolvconf_networksetup() { |
| 391 | NEW_RESOLVCONF="" |
| 392 | for i in $INTERNAL_IP4_DNS; do |
| 393 | NEW_RESOLVCONF="$NEW_RESOLVCONF $i" |
| 394 | done |
| 395 | echo /usr/sbin/networksetup -setdnsservers AirPort $NEW_RESOLVCONF |
| 396 | /usr/sbin/networksetup -setdnsservers AirPort $NEW_RESOLVCONF |
| 397 | /usr/sbin/networksetup -setdnsservers Ethernet $NEW_RESOLVCONF |
| 398 | if [ -n "$CISCO_DEF_DOMAIN" ]; then |
| 399 | echo /usr/sbin/networksetup -setsearchdomains AirPort $CISCO_DEF_DOMAIN |
| 400 | /usr/sbin/networksetup -setsearchdomains AirPort $CISCO_DEF_DOMAIN |
| 401 | /usr/sbin/networksetup -setsearchdomains Ethernet $CISCO_DEF_DOMAIN |
| 402 | fi |
| 403 | } |
| 404 | |
| 405 | restore_resolvconf_networksetup() { |
| 406 | /usr/sbin/networksetup -setdnsservers AirPort empty |
| 407 | /usr/sbin/networksetup -setdnsservers Ethernet empty |
| 408 | /usr/sbin/networksetup -setsearchdomains AirPort empty |
| 409 | /usr/sbin/networksetup -setsearchdomains Ethernet empty |
| 410 | } |
| 411 | |