Change to a better Mac-friendly DNS flush method.

This commit is contained in:
Scott Wallace 2015-09-15 19:38:24 +01:00
parent 9193348356
commit 22afd81596

View file

@ -11,13 +11,21 @@ function sorry()
} }
case ${OS} in case ${OS} in
Darwin) case ${REL} in Darwin) PROD_VER=$(sw_vers -productVersion)
14.*) sudo dscacheutil -flushcache case ${PROD_VER} in
;; 10.10.3|\
13.*) sudo pkill mDNS 10.10.2|\
;; 10.10.1|\
*) sorry 10.10.0|\
;; 10.10) sudo discoveryutil mdnsflushcache
;;
10.6.*|\
10.6) sudo dscacheutil -flushcache
;;
*) sudo killall -HUP mDNSResponder
;;
esac esac
;; ;;