On Sat, Jan 3, 2015 at 4:05 AM, Luke Diamand <[email protected]> wrote:
> I'm trying to write a ./run file for autofs which will wait for ypbind to > come up before starting autofs. > > I've got a line in autofs/run that says: > > sv check ypbind > Try this instead: sv check ypbind || exit 1 This is crude and will still result in a "restart loop" but it will at least exit out of ./run completely. Better yet, you can sv start ypbind || exit 1 and it will either be up and running, or not. Although you'll still have restart loops if something is wrong. The runsvdir program, near as I can tell, walks through the directory and starts a runsv for each definition it finds. There is no apparent sequence to this - so I can only assume it's starting programs in whatever order that it reads off of the disk. So, yes, it is entirely possible that script B will run before script A, but A is needed by B. This is "by design", the idea being that all programs eventually come up; if something isn't up yet, it simply waits for it to come up otherwise. I can't comment on the rest, as I don't use ./check scripts.
