startup / shutdown script (rc.d)
RW
fbsd06 at mlists.homeunix.com
Fri Jun 1 11:40:09 UTC 2007
On Thu, 31 May 2007 14:06:45 -0700 (PDT)
gmoniey <gmoniey at gmail.com> wrote:
>
> Hi,
>
> I was wondering if there is a simple way to create 1 script that will
> be called during startup and shutdown. Basically, I am looking for
> something like this:
>
> if startup
> run command 1 with params
> run command 2 with params
> run command 3 with params
>
> if shutdown
> run command 4 with params
> run command 5 with params
> run command 6 with params
>
> i have tried lookin up rc.d documentation, but it very vague and
> difficult to understand...thanks
There are lots of existing scripts that do this kind of thing. A good
example is /etc/rc.d/random which feeds entropy files to /dev/random on
startup, and writes-out entropy on shutdown. It's pretty easy to see
what's going-on.
More information about the freebsd-questions
mailing list