I am running homebrew dnsmasq on my Mac.

Dsmasq is configured to only respond to traffic on one NIC (en7). en7 is a usb-c ethernet adapter.

When this adapter is not active (not plugged in, switch not switched on) homebrew.mxcl.dnsmasq is spamming my system logs that dnsmasq cannot be started because the NIC is not available. Retrying every 1 second.

I know the KeepAlive.NetworkState key can make that homebrew.mxcl.dnsmasq only launches when a network is available. The issue is that there is ALWAYS a network available, my Wifi adapter is always on.

What i am looking for is a way to launch homebrew.mxcl.dnsmasq only when en7 becomes available (adapter plugged in and switch switched on).

Is this possible?

1 Answer 1


Not possible....

From https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/Introduction.html

Network Availability

If your daemon depends on the network being available, this cannot be handled with dependencies because network interfaces can come and go at any time in OS X. To solve this problem, you should use the network reachability functionality or the dynamic store functionality in the System Configuration framework. This is documented in System Configuration Programming Guidelines and System Configuration Framework Reference. For more information about network reachability, see Determining Reachability and Getting Connected in System Configuration Programming Guidelines.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .