On Sun, Jul 31, 2005 at 09:37:32PM +0200, a-aa wrote: > I absolutly agree with that, but think about this. > If you have 5 services, all of which depends on the "master" being up. > And that will try to connect to it's master at start. > > How do you deal with that? A solution like this for all of them?: > > daemon --no-fork & > while ls <file that indicates it's up, or netcat to see if port is > open?>; do > sleep 1 > done > fg 1 > > As executing them in order wont do anything. You can't execute a daemon > with --no-fork and expect it to be up a millisecond after, then anything > depending on it has a high chance of failure.
The problem you're describing actually isn't a problem when using runit, you should try it out. On system boot all services are started up in parallel. If services depending on other services fail if the services they depend on are not available, all is fine; due to the restart, they'll sort out automatically. For those special services that take a lot of resources before finding out that they should fail, you can add a minimal test for the dependency, but generally this shouldn't be necessary #!/bin/sh check-dependency || exit 1 exec service-daemon This also may be a workaround for services that don't detect a missing service they depend on, but actually in this case the service daemon should be fixed to fail in this case. The advantage of this concept is that it not only works at boot-time, but also on system's uptime and services failing unintentionally. Furthermore in my opinion it's an quite easy solution to a rather complex problem; keep it simple stupid. Regards, Gerrit. -- Open projects at http://smarden.org/pape/. _______________________________________________ initscripts-ng-devel mailing list [EMAIL PROTECTED] http://lists.alioth.debian.org/mailman/listinfo/initscripts-ng-devel

