From owner-freebsd-questions@FreeBSD.ORG Wed Feb 6 19:03:42 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 9ED6016A46E for ; Wed, 6 Feb 2008 19:03:42 +0000 (UTC) (envelope-from fbsd06+S3=4afc8aa7@mlists.homeunix.com) Received: from turtle-out.mxes.net (turtle-out.mxes.net [216.86.168.191]) by mx1.freebsd.org (Postfix) with ESMTP id 5077713C461 for ; Wed, 6 Feb 2008 19:03:42 +0000 (UTC) (envelope-from fbsd06+S3=4afc8aa7@mlists.homeunix.com) Received: from mxout-03.mxes.net (mxout-03.mxes.net [216.86.168.178]) by turtle-in.mxes.net (Postfix) with ESMTP id 6198B16469E for ; Wed, 6 Feb 2008 13:46:09 -0500 (EST) Received: from gumby.homeunix.com. (unknown [87.81.140.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id BF26123E4CB for ; Wed, 6 Feb 2008 13:46:07 -0500 (EST) Date: Wed, 6 Feb 2008 18:46:04 +0000 From: RW To: freebsd-questions@freebsd.org Message-ID: <20080206184604.62b6ac6d@gumby.homeunix.com.> In-Reply-To: References: <1563a4fd0802060609j59451879h3920be790d7667c0@mail.gmail.com> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.7; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 19:03:42 -0000 On Wed, 06 Feb 2008 15:55:12 +0100 Ivan Voras wrote: > I've seen some complicated examples on this thread, and want to > suggest a simple one: > > 1. create a regular shell script in /etc/rc.d, n >.. > A more semantically pure example (and the one that's preferred if your > script starts an external application - a web server or something like > that) is to put the script in /usr/local/etc/rc.d. In any case, the > syntax and everything else is the same. This is a bit muddled. /etc/rc.d is for system RCNG scripts. /usr/local/etc/rc.d is for local RCNG scripts and legacy scripts that simply respond to stop/start in $1. Legacy scripts end in .sh and are called from /etc/rc.d/localpkg in dictionary order. Since the OP appears to have such a script it should be given a ".sh" extension and placed in /usr/local/etc/rc.d, not in /etc/rc.d.