as daemontools provide djbdns the startup script needs some time to startup and provide these services. As svscan starts in the background following services like ntpdate will get an error as the dns service is not yet started. my fix is to put a sleep 3 in the startup funiction of daemontools
See Bug 6332 for a better fix *** This bug has been marked as a duplicate of 6332 ***
6332 does not solve this problem. For example if 6332 is not applied, ntpd will be started before svscan and ntpdate will fail. If 6332 is applied, nptd will be started after svscan, but ntpdate will still fail, because djbdns stated through the daemontools will need some time to start up.
If you utilize an ip instead of a name (131.107.1.10 instead of time- nw.nist.gov) for your ntpdate server, will that avoid the failing DNS lookup?
mh, that's a work around, but not a fix. Especially it's not guaranteed that the ip addresses of ntp servers stay the same. I think the better work around is to put someting like sleep 2 in the svc startup script.
As I have not come up with a better answer... I will add this to the startup script. Where should I put the "sleep 2" statement? Should I put it in the depend() function so the script sleeps while the "net" services start up?
I have put it here: start() { ebegin "Starting service scan ..." PATH="/usr/bin:$PATH" cd /service start-stop-daemon --start --quiet --exec /usr/bin/svscan -- & echo $! > /var/run/svscan.pid eend $? sleep 2 }
Can I suggest the runit (http://smarden.org/runit/) package and specifically the svwaitup utility? Instead of arbitrary sleeps/stalls, you use the following in your ntpd script. # svwaitup /service/tinydns /service/dnscache I assume DJB will integrate something similar, in future. It's just a good idea.
* Installing the svscan startup file ... cp: cannot create regular file `/var/tmp/portage/daemontools-0.76- r2/temp//etc/init.d/svscan': No such file or directory install: cannot stat `/var/tmp/portage/daemontools-0.76- r2/temp//etc/init.d/svscan': No such file or directory :( Should I worry... ?
oops... sorry about that... i have fixed the ebuild.
depscan + rc script should do this :)