From owner-freebsd-questions@FreeBSD.ORG Wed Feb 6 15:40:34 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35CAA16A46B for ; Wed, 6 Feb 2008 15:40:34 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id D686613C458 for ; Wed, 6 Feb 2008 15:40:33 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id m16FbBJX018987; Wed, 6 Feb 2008 10:37:11 -0500 (EST) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id m16FbBWg018986; Wed, 6 Feb 2008 10:37:11 -0500 (EST) (envelope-from jerrymc) Date: Wed, 6 Feb 2008 10:37:11 -0500 From: Jerry McAllister To: Pietro Cerutti Message-ID: <20080206153711.GB18883@gizmo.acns.msu.edu> References: <1563a4fd0802060609j59451879h3920be790d7667c0@mail.gmail.com> <47A9C2A2.1070100@gahr.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47A9C2A2.1070100@gahr.ch> User-Agent: Mutt/1.4.2.2i Cc: navneet Upadhyay , User Questions Subject: Re: script to be executed on system startup. 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: Wed, 06 Feb 2008 15:40:34 -0000 On Wed, Feb 06, 2008 at 03:22:26PM +0100, Pietro Cerutti wrote: > navneet Upadhyay wrote: > > Hi, > > Hello, > > > I have a script file, i want that script to be executed on system > > startup. > > > > I am doing this on Linux in following two steps : - > > > > 1. Copying the script to /etc/rc.d directory. > > 2. /sbin/chkconfig --add "scriptname" > > > > > > I want to achieve the same on FreeBSD > > > > chckconfig file is not present, documentation says i have to add it to > > rc.conf file. > > > > How can i add it to rc.conf file, is there any command? > > you just edit rc.conf and you add a line in the form > > _enable="YES" > > Then you place the script in /usr/local/etc/rc.d > > at the bottom of the rc(8) man page there are a few examples on how to > build such a script. One more thing that may seem obvious, but is easy to forget. The script must have execute permission set on the file. ////jerry > -- > Pietro Cerutti > > PGP Public Key: > http://gahr.ch/pgp