From owner-freebsd-questions@FreeBSD.ORG Sun Feb 4 00:57:54 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5EF9116A402 for ; Sun, 4 Feb 2007 00:57:54 +0000 (UTC) (envelope-from jhary@unsane.co.uk) Received: from unsane.co.uk (www.unsane.co.uk [85.233.185.162]) by mx1.freebsd.org (Postfix) with ESMTP id E7D6D13C461 for ; Sun, 4 Feb 2007 00:57:53 +0000 (UTC) (envelope-from jhary@unsane.co.uk) Received: from [10.0.0.178] ([10.0.0.178]) (authenticated bits=0) by unsane.co.uk (8.13.8/8.13.8) with ESMTP id l140wVQG024652 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 4 Feb 2007 00:58:43 GMT (envelope-from jhary@unsane.co.uk) Message-ID: <45C52F87.7060707@unsane.co.uk> Date: Sun, 04 Feb 2007 00:57:43 +0000 From: Vince User-Agent: Thunderbird 1.5.0.7 (X11/20061027) MIME-Version: 1.0 To: Bob References: <20070203190512.0eaf536e@tania.servebbs.org> In-Reply-To: <20070203190512.0eaf536e@tania.servebbs.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Rc.Local X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Feb 2007 00:57:54 -0000 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