Re: Ordering for network-sensitive rc scripts

From: Warner Losh <imp_at_bsdimp.com>
Date: Sat, 19 Apr 2014 19:36:59 -0600
On Apr 17, 2014, at 2:21 AM, David Chisnall <theraven_at_FreeBSD.org> wrote:
> For a little while, I've had an issue with the machine that sits on the edge of my network deciding to start avahi as soon as a network is available, meaning that it then runs mDNS advertisements on the external interface and not the wireless one, requiring a manual restart once the machine boots.  I'm now seeing something similar with pf - it manages to start before the external interface comes up and so silently ignores all of the rules for routing packets off the network.
> 
> Do we have a mechanism for stating that certain services should not be started until ALL of the interfaces are up, rather than just the first one?  Or even of restarting them when a new network appears?

devd network events will allow you to do this on a per-network basis. The script that you run can then determine if the relevant criteria are in place and then do something...

Warner
Received on Sat Apr 19 2014 - 23:37:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:48 UTC