Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Nov 2000 20:49:36 +1000
From:      Greg Black <gjb@gbch.net>
To:        Jan Grant <Jan.Grant@bristol.ac.uk>
Cc:        Christoph Sold <so@server.i-clue.de>, Jimmy Olgeni <olgeni@uli.it>, hackers@FreeBSD.ORG
Subject:   Re: What about rc.shutdown.local? 
Message-ID:  <nospam-3a0d2456af06f84@maxim.gbch.net>
In-Reply-To: <Pine.GSO.4.21.0011111034001.1850-100000@mail.ilrt.bris.ac.uk>  of Sat, 11 Nov 2000 10:35:49 GMT
References:  <Pine.GSO.4.21.0011111034001.1850-100000@mail.ilrt.bris.ac.uk> 

next in thread | previous in thread | raw e-mail | index | archive | help
Jan Grant writes:

> It _is_ trivial, but you miss my point: I run several things at startup
> that rely on a database service (which needs to be launched first). When
> they shut down, the DB must still be running (it's taken down last). So
> using a *.sh pattern for startup and shutdown scripts doesn't satisfy my
> requirements.

It's easy to miss a pont that isn't well made.  Never mind.  The
task is still trivial.  Three obvious solutions spring to mind:

1. Put a sleep in the stop case that gives enough time for the
   other scripts to run.

2. Make the last script that has to run /before/ this one create
   a sentinel file when it finishes; let this script wait until
   the sentinel appears, then it removes the sentinel and does
   its stuff.

3. Give this script two links.  On startup, it runs if it's
   running under the startup name; on shutdown, it runs if it's
   running under the other name.

If none of these does the trick, they should at least point the
way.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?nospam-3a0d2456af06f84>