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

and then a ./check script inside the ypbind directory which runs ypwhich.

The man page for 'sv' seems to imply that if the requested state of the service is 'up' it will run my check script.

However, I'm finding that quite often, the check script doesn't get run.

In the cases where it fails, 'sv status ypbind' says:

down: ypbind: 0s, normally up, want up; down: log: 0s, normally up, want up

It somewhat looks as though if the service is down, the ./check script won't be run, regardless of the requested state.

I could be wrong about this, but is the problem that runsvdir just starts all the runsv instances in sequence, so my autofs service is being started when the ypbind service is still down, with a requested state of down?

Thanks!
Luke





Reply via email to