On Wed, Apr 18, 2007 at 08:30:31AM +0800, Trent Lloyd wrote: > Howdy, > > >Instead, consider: > > > >1. The only reason this script needs to run when an interface is taken > > down is to restart avahi if avahi was disabled due to .local in the dns > > when the the interface was brought up. > >2. If that's the case, then > >/var/run/avahi-daemon/disabled-for-unicast-local > > should already exist, created by this script when the interface came > > up. > >3. So if it doesn't exist, the script doesn't need to do anything else > > when the interface is taken down. Just test for the file and exit if > > it's not there. > > > This assumes you are only ever connected to one network and downing one > interface won't change the unicast .local situation, which is not correct.
Uhm, no joeyh's reasoning is quite correct. The only reason we check when interfaces go down is to see if we can re-enable avahi (assuming that an interface that goes down, doesn't add dns servers). Which obviously we don't have to do when avahi wasn't disabled. > Having said that, this delay is also annoying. > > I wonder if we can background this check without causing hassles? Theoretically we could, but then we'll have to be very carefull about race conditions... I think we're currently working around most of the real causes of slowdown. The only thing that we can't work around is unreachable dns servers when your interface is up... Sjoerd -- You can't run away forever, But there's nothing wrong with getting a good head start. -- Jim Steinman, "Rock and Roll Dreams Come Through" -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]