From owner-freebsd-stable@FreeBSD.ORG Sun Jun 7 18:30:38 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A80EA10656A5 for ; Sun, 7 Jun 2009 18:30:38 +0000 (UTC) (envelope-from cliftonr@lava.net) Received: from outgoing02.lava.net (pie.lava.net [IPv6:2001:1888:0:1:230:48ff:fe5b:3b8c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A1848FC14 for ; Sun, 7 Jun 2009 18:30:38 +0000 (UTC) (envelope-from cliftonr@lava.net) Received: from malasada.lava.net (malasada.lava.net [64.65.64.17]) by outgoing02.lava.net (Postfix) with ESMTP id 72DB5170B3D; Sun, 7 Jun 2009 08:30:37 -1000 (HST) Received: by malasada.lava.net (Postfix, from userid 102) id 1CA9F153882; Sun, 7 Jun 2009 08:30:37 -1000 (HST) Date: Sun, 7 Jun 2009 08:30:36 -1000 From: Clifton Royston To: AES Message-ID: <20090607183035.GA22240@lava.net> Mail-Followup-To: AES , freebsd-stable@freebsd.org References: <143776.42704.qm@web34307.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <143776.42704.qm@web34307.mail.mud.yahoo.com> User-Agent: Mutt/1.4.2.2i Cc: freebsd-stable@freebsd.org Subject: Re: I need to add commands that starts every time at system boot. X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 18:30:39 -0000 On Sun, Jun 07, 2009 at 10:29:57AM -0700, AES wrote: > I need to add commands that starts every time at system boot. >   > which script is the one that starts first and where can I find it? You should add a script of your own to the directory /usr/local/etc/rc.d, and have it check the first parameter to see under what circumstances it is being invoked. If the first parameter is "start", then the system is being started, or at least you are requesting that your script be run as if it were starting. I strongly recommend against adding anything to the /etc/rc script itself. If you feel you just *can't* do it via a script in /usr/local/etc/rc.d, which is the better way, add a script called /etc/rc.local and that will be run after all the other start-up steps. "man rc" for more information, man "rcorder" if you need to control the order in which your script runs relative to other startup scripts. -- Clifton -- Clifton Royston -- cliftonr@iandicomputing.com / cliftonr@lava.net President - I and I Computing * http://www.iandicomputing.com/ Custom programming, network design, systems and network consulting services