>>>>> "Matthew" == Matthew Seaman <[email protected]> writes:

Matthew> For extra credit, write a small routine that attempts to log into
Matthew> postgres (or otherwise establish that postgres is up and doing) and
Matthew> loops until it succeeds or it has reached a certain maximum number of
Matthew> tries.  Make this a function called start_precommand() and use the
Matthew> run_rc_command facility so it only runs if the script is given some 
form
Matthew> of start argument.  Docco on rc script functionality is in rc.subr(8)

Matthew> Also look at:
Matthew> http://www.freebsd.org/doc/en/books/porters-handbook/rc-scripts.html

Yeah, I'd been staring at those for a few hours, even staring at the
source code of rc.subr to sort this out.  Thanks for the drop-in
answer.  I'll see if it does the job on the next reboot.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[email protected]> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-rc
To unsubscribe, send any mail to "[email protected]"

Reply via email to