Summary: | daemontools init script needs time to startup | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Dominik Westner <gentoo> |
Component: | Current packages | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | radek |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Dominik Westner
2002-08-11 13:05:24 UTC
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 :) |