Rc.Local
Vince
jhary at unsane.co.uk
Sun Feb 4 00:57:54 UTC 2007
Bob wrote:
> Hi:
>
> While running Linux, I would put things like:
>
> /sbin/route add -net 87.5.0.0 -netmask 255.255.0.0 127.0.0.1 -blackhole
>
> in /etc/rc.d/rc.local along with any "local" configurations I wanted.
>
> Under FreeBSD, /etc/rc.d/rc.local does not seem to be an end-user rc
> file IE, it does real start-up stuff, and is part of the base system.
>
> My Question: Where is the proper place under FreeBSD, to put truly
> local start-up commands? Commands I want executed at the very END of the
> boot process, and which are truly LOCAL?
>
> Bob
>
>
Man rc.local suggests:
The rc.local script contains com-
mands which are pertinent only to a specific site. Typically, the
/usr/local/etc/rc.d/ mechanism is used instead of rc.local these
days but
if you want to use rc.local, it is still supported. In this case, it
should source /etc/rc.conf and contain additional custom startup
code for
your system. The best way to handle rc.local, however, is to
separate it
out into rc.d/ style scripts and place them under /usr/local/etc/rc.d/.
so either create and use /etc/rc.local or create scripts in
/usr/local/etc/rc.d/
However the correct way to add a route as per your example would be to
add something like:
static_routes="blackhole"
route_blackhole="87.5.0.0/16 127.0.0.1"
to /etc/rc.conf (or if you prefer /etc/rc.conf.local)
Hope that helps a little.
Vince
More information about the freebsd-questions
mailing list