[launchd-dev] Run job when network configuration changes

Jeremy Reichman jaharmi at jaharmi.com
Mon Oct 29 18:00:30 PDT 2007


On Mon, 29 Oct 2007 20:43:20 +0100, "Quinn" <eskimo1 at apple.com> said:
> At 14:55 -0400 29/10/07, Jeremy Reichman wrote:
> >Could this be used to run a job _once_ whenever the system's network
> >configuration changes ... a laptop moves from wired to wireless, or moves
> >from work to home, or the like? But run the same job each time the network
> >config changes? I'm not quite sure from the description.
> 
> AFAICT this won't do what you want.  This option is triggered when 
> the system transitions from zero IP interface to not zero IP 
> interfaces, and vice versa.  It is not triggered, for example, when 
> you transition from one IP address to a different one.

Is there a way to run such a job with launchd now? If Kicker.xml from
SystemConfiguration is gone, as I've heard, I'd like to find an
alternative. I have had at least one specific need for it in the past.

It always would have been cleaner, to my way of thinking, to have
launchd let me watch for network change events directly and then trigger
my job. This feels like a good addition if it's not there, now that
launchd can trigger a job during the transition from zero to some
interfaces and vice versa. The missing piece appears to be the
transition from one IP to another.

If that's still not possible in launchd I'd be happy to file an
enhancement request, unless there's a specific reason this type of
trigger should be avoided. Thanks!


--
Jeremy


More information about the launchd-dev mailing list