From owner-freebsd-stable@FreeBSD.ORG Tue Jun 20 16:38:07 2006 Return-Path: X-Original-To: stable@FreeBSD.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F90316A47A for ; Tue, 20 Jun 2006 16:38:07 +0000 (UTC) (envelope-from M.Hirsch@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.21]) by mx1.FreeBSD.org (Postfix) with SMTP id 5543C43D48 for ; Tue, 20 Jun 2006 16:38:06 +0000 (GMT) (envelope-from M.Hirsch@gmx.de) Received: (qmail invoked by alias); 20 Jun 2006 16:38:05 -0000 Received: from HSI-KBW-085-216-025-126.hsi.kabelbw.de (EHLO [192.168.101.121]) [85.216.25.126] by mail.gmx.net (mp023) with SMTP; 20 Jun 2006 18:38:05 +0200 X-Authenticated: #820862 Message-ID: <44982469.9050008@gmx.de> Date: Tue, 20 Jun 2006 18:38:01 +0200 From: "M.Hirsch" User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: stable@FreeBSD.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: Pete French Subject: Re: Question about current rc scripts 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: Tue, 20 Jun 2006 16:38:07 -0000 I have investigated a bit more. Setting the variables can't work. As far as I can see, rc.conf is sourced from rc.subr. And every single script in /etc/rc.d/ sources rc.subr, so they reload the rc.conf file for each call. The "rc" scripts are being executed in a sub-shell though. So overwriting variables in any of them will have no effect on the following files. It does work for /usr/local/etc/rc.d though, but I really need it to execute before anything else. I made it work by overwriting rc.diskless (again). Stupid /me, rc.diskless does not follow the syntax for rc scripts. It's just a "normal" shell script :) Anyways, I would still be interested in the "correct" way to do it. M. Pete French schrieb: >I thought rc.conf was simply a script that set some variables. If >this is the case then you don't need to overwrite it - you simply need to >make your script set the appropriate variables and then drop it in as >a repplacement for rc.conf - hence no need to rewrite rc.conf at all. > >-pcf. > >