Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Mar 2006 16:16:06 -0500 (EST)
From:      Jerry McAllister <jerrymc@clunix.cl.msu.edu>
To:        corwin@aeternal.net
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Best Way to Start an App at Boot Time?
Message-ID:  <200603182116.k2ILG76o015355@clunix.cl.msu.edu>
In-Reply-To: <441C745C.4010407@aeternal.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> Hello Robert,
> 
> robert wrote:
> > rc.local is not normally used with later versions of Freebsd - see man
> > rc.local. 
> > 
> > The script should tell you how to use it, but normally it should be
> > added to /usr/local/etc/rc.d and called from /etc/rc.conf with something
> > like denyhosts="YES".

You are mostly right, but a quibble about your terminology.

You do not 'call' it from /etc/rc.conf (or /etc/rc/conf.local)
by putting in the denyhosts="YES" line.

Putting the denyhosts="YES" line in rc.conf sets that as an environment
variable which the script in /usr/local/etc/rc.d can examine and
decide whether to do its thing or not.

There is another process that runs during startup.  It obtains a list
of the contents of the /usr/local/etc/rc.d directory.  It then executes 
all of the files whose name ends in .sh and has execute permission set 
on them.  Each of them is run in turn and given the single parameter 
of 'start'.

Those files are normally scripts and they are given the environment variables
of rc.conf (and rc.conf.local or another if there is an include for it).

Obviously, you could put a statement in rc.conf that causes something
to run right then, but that is not the expected way to do it.

////jerry

> 
> Nice to know this :), thank you.
> 
> Martin
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
> 




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