# avahi-daemon startup order

## seanmcg

Hi folks,

Now that global IPv6 is becoming more and more of a reality, I've been reviewing many of my machine configurations to see how well they play with IPv6.

I noticed that when I reboot, avahi-daemon is starting before my IPv6 link is configured and it starts talking to my LDAP server on IPv4. If I restart it manually, it then switches to IPv6.

How do I tell it to start late enough to use IPv6 instead, is there some kind of dependancy I should change for the avahi-daemon service?

Thanks in advance,

Sean

----------

## gerdesj

 *seanmcg wrote:*   

> Hi folks,
> 
> Now that global IPv6 is becoming more and more of a reality, I've been reviewing many of my machine configurations to see how well they play with IPv6.
> 
> I noticed that when I reboot, avahi-daemon is starting before my IPv6 link is configured and it starts talking to my LDAP server on IPv4. If I restart it manually, it then switches to IPv6.
> ...

 

Assuming you use OpenRC, you can set dependencies.  The doc is in /etc/rc.conf under SERVICE CONFIGURATION VARIABLES.

It seems you create /etc/conf.d/avahi-daemon and add this:

```

rc_after="network"

```

If your IPv6 address is coming in really late then set the depend to something late in the boot process like "local" which I think is last!

If that does not work then call a script from /etc/local.d/myscript.start with a delay in it ...

Cheers

Jon

----------

