From owner-freebsd-questions@FreeBSD.ORG Wed Feb 6 14:23:11 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 DF7FF16A41A for ; Wed, 6 Feb 2008 14:23:11 +0000 (UTC) (envelope-from derek@computinginnovations.com) Received: from betty.computinginnovations.com (mail.computinginnovations.com [64.81.227.250]) by mx1.freebsd.org (Postfix) with ESMTP id 6F38213C4EC for ; Wed, 6 Feb 2008 14:23:11 +0000 (UTC) (envelope-from derek@computinginnovations.com) MailScanner-NULL-Check: 1202912582.6174@Ovz2Wl9QcQgKSd3eY60cpw Received: from p28.computinginnovations.com (dhcp-10-20-30-100.computinginnovations.com [10.20.30.100]) (authenticated bits=0) by betty.computinginnovations.com (8.14.2/8.13.8) with ESMTP id m16EN2iC007904; Wed, 6 Feb 2008 08:23:02 -0600 (CST) (envelope-from derek@computinginnovations.com) Message-Id: <6.0.0.22.2.20080206081827.02516d20@mail.computinginnovations.com> X-Sender: derek@mail.computinginnovations.com X-Mailer: QUALCOMM Windows Eudora Version 6.0.0.22 Date: Wed, 06 Feb 2008 08:22:44 -0600 To: "navneet Upadhyay" , freebsd-questions@freebsd.org From: Derek Ragona In-Reply-To: <1563a4fd0802060609j59451879h3920be790d7667c0@mail.gmail.co m> References: <1563a4fd0802060609j59451879h3920be790d7667c0@mail.gmail.com> Mime-Version: 1.0 X-ComputingInnovations-MailScanner-Information: Please contact the ISP for more information X-ComputingInnovations-MailScanner: Found to be clean X-ComputingInnovations-MailScanner-From: derek@computinginnovations.com X-Spam-Status: No Content-Type: text/plain; charset="us-ascii"; format=flowed X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: 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 14:23:12 -0000 At 08:09 AM 2/6/2008, navneet Upadhyay wrote: >Hi, > 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 don't need any command. Depending on the version of FreeBSD, put your script in /usr/local/etc/rc.d and if you are using earlier than 6.X FreeBSD name the script chckconfig.sh You can name it in the same in 6.X and 7.X and it will work. Be sure the script is chmod'd (usually 755) to execute. Since your script runs without a known environment be sure to either use full pathnames for executables or set the path in your script. -Derek -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support.