Date: Sun, 04 Feb 2007 00:57:43 +0000 From: Vince <jhary@unsane.co.uk> To: Bob <bob@tamara-b.org> Cc: freebsd-questions@freebsd.org Subject: Re: Rc.Local Message-ID: <45C52F87.7060707@unsane.co.uk> In-Reply-To: <20070203190512.0eaf536e@tania.servebbs.org> References: <20070203190512.0eaf536e@tania.servebbs.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45C52F87.7060707>
