From owner-freebsd-questions@FreeBSD.ORG Wed May 12 18:02:34 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F23D16A4CE for ; Wed, 12 May 2004 18:02:34 -0700 (PDT) Received: from hobbiton.shire.net (hobbiton.shire.net [206.71.64.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id 031BE43D4C for ; Wed, 12 May 2004 18:02:34 -0700 (PDT) (envelope-from chad@shire.net) Received: from [67.161.247.57] (helo=[192.168.99.66]) by hobbiton.shire.net with asmtp (TLSv1:RC4-SHA:128) (Exim 4.10) id 1BO4cL-000Jk9-00 for freebsd-questions@freebsd.org; Wed, 12 May 2004 19:02:33 -0600 Mime-Version: 1.0 (Apple Message framework v613) In-Reply-To: <20040513083639.512f9908@bofh.spyderweb.com.au> References: <67797B99-A468-11D8-A0B4-003065A70D30@shire.net> <20040513083639.512f9908@bofh.spyderweb.com.au> Message-Id: <351B402A-A479-11D8-A0B4-003065A70D30@shire.net> From: "Chad Leigh -- Shire.Net LLC" Date: Wed, 12 May 2004 19:02:29 -0600 To: freebsd-questions@freebsd.org Questions X-Mailer: Apple Mail (2.613) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on hobbiton.shire.net X-Spam-Status: No, hits=-0.0 required=5.0 tests=BAYES_40 autolearn=no version=2.63 X-Spam-Level: Subject: Re: FreeBSD 5 rc.d scripts and /usr/local/etc/rc.d X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 May 2004 01:02:34 -0000 On May 12, 2004, at 5:06 PM, Tim Aslat wrote: > In the immortal words of "Chad Leigh -- Shire.Net LLC" > ... >> "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/." > > That's right > >> So I created an rc.d style script for my own service and stuck it in >> /usr/local/etc/rc.d/. It does not have a .sh on the end as it should >> run in a subshell as detailed in the rc man page. I also added > > There's your problem, all scripts in rc.d must have a .sh extension or > they will be ignored (unless included from another script/program) > > rename to myscript.sh and it will work However, the rc man page says: " 4. Call each script in turn using run_rc_script() (from rc.subr(8)), which sets $1 to ``start'', and sources the script in a subshell. If the script has a .sh suffix then it is sourced directly into the current shell. " So what you are saying is that rc on startup does NOT do the same stuff on /usr/local/etc/rc.d/ as it does on /etc/rc.d? It does not get a list, check them for nostart, order them and then run each one using run_rc_script()? If that is so, why does the man page say to make rc.d style scripts and place them under /usr/local/etc/rc.d if it is not going to do rc style processing on them? Trying to wrap my head around this Thanks Chad