On Thu, Mar 08, 2007 at 08:31:23AM -0800, Drew Jenkins wrote:

> Anyway, I suggest first just working on getting any script to run
> at boot time - or rather at the time the system comes up for multi-
> user, but that stuff does not run when it comes up to single-user.
> So, my next suggestion is to make any little ole script with a couple
> of echo-s in it to demonstration that it runs and put that it
> the /usr/local/etc/rc.d directory with the correct permissions
> and name, etc.   NOTE, someone in an earlier post clarified the .sh
> issue with information that was new to me about the system looking
> for certain flags inside the file if the file name does not have
> the .sh ending.   Go back and check that out, but the this, assume
> you have to have .sh and execute permission.
> You do not have to have a start/stop/restart check in the script if
> the script will always just run regardless of parameter.   But,
> what the system does is call the script with a parameter of 'start'
> at boot time and a parameter of 'stop' at shutdown time.
> But for the sake of the primative test, those can be omitted.
> Let's say you call the scriptfile: 'rctest.sh'
> Put something like:
> #!/bin/sh
> echo "running rctest.sh, got this far"
> # Add any any other stuff you want to test
> echo "running rctest.sh, finished"
> Now, if the bare skeleton works, then start adding more parts
> to it until you get to where everything works.   Add more echo-s
> if they are useful.

But I've done that (except name it *.sh, which I just did). And I'm not at the 
server. It's on the other side of the globe. So I can't watch echo's pop up as 
it boots. Here's my script:


sleep 60
if [ -n "$LD_LIBRARY_PATH" ] ; then
    export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib/mysql"
    export LD_LIBRARY_PATH="/usr/local/lib/mysql"

cd /usr/local/zope/
./instance1/bin/zopectl stop
./instance1/bin/zopectl start
./instance2/bin/zopectl stop
./instance2/bin/zopectl start

The sleep is in there to try to get it to run after everything else has come 
up, but it doesn't help. If I run that script after boot, everything works out 

> You could also look up how to get your messages written to a log

Hey, now there's an idea! How do I do that? Or where do I go to study how to do 

Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to