From owner-freebsd-current@FreeBSD.ORG Tue Jul 17 10:31:56 2007 Return-Path: X-Original-To: freebsd-current@FreeBSD.ORG Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A086716A400 for ; Tue, 17 Jul 2007 10:31:56 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id 1DDAD13C4B7 for ; Tue, 17 Jul 2007 10:31:55 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (qfmhmd@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id l6HAVmh5088206; Tue, 17 Jul 2007 12:31:53 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id l6HAVmDZ088205; Tue, 17 Jul 2007 12:31:48 +0200 (CEST) (envelope-from olli) Date: Tue, 17 Jul 2007 12:31:48 +0200 (CEST) Message-Id: <200707171031.l6HAVmDZ088205@lurza.secnetix.de> From: Oliver Fromme To: freebsd-current@FreeBSD.ORG, marck@rinet.ru, dougb@FreeBSD.ORG In-Reply-To: <469BB428.1020200@FreeBSD.org> X-Newsgroups: list.freebsd-current User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 17 Jul 2007 12:31:54 +0200 (CEST) Cc: Subject: Re: RFT: bin/106642: [patch] Allow excluding certain files from mergemaster (8) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-current@FreeBSD.ORG, marck@rinet.ru, dougb@FreeBSD.ORG List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2007 10:31:56 -0000 Doug Barton wrote: > Dmitry Morozovsky wrote: > > On Wed, 11 Jul 2007, Doug Barton wrote: > > > > DB> > About pre-script which you suggested, there is another problem -- I MAY > > DB> > have new scripts in /etc/rc.d, but NEVER change the system's scripts. > > DB> > > DB> Simple answer, don't do that. Put your scripts in /usr/local/etc/rc.d > > DB> instead, and as of 6.1 and newer they will be included in the base > > DB> rcorder. Therefore there will be no difference in when they are run. > > DB> There is a default assumption that stuff in /etc/rc.d is the systems, > > DB> and the systems only. Now that local scripts (including ports) are in > > DB> the base rcorder, there is no reason not to do it that way. > > > > The first exclusion in mind would be scripts that should be running before > > mounting file systems other than root... > > My recommendation in that scenario would be to play with the value of > early_late_divider until you got something that worked for you. That's > why I made it a variable. :) > > If there is a particular combination of things that have to happen > that early_late_divider won't work for, I'd be interested in hearing > that so that we could look at possibly adjusting the code if it's > possible. On my notebook I have a script /etc/rc.d/net-detect that pings several IP addresses in order to find out in which network environment the notebook is used (at the office, at home with wlan, at home with 100base-t, or no network at all). The script then adjusts several symlinks based on the network environment, i.e. several files in /etc are changed, including rc.conf, ntp.conf, resolv.conf, fstab (!), hosts and others. That script runs as the very first rc script, even before root is mounted r/w (it does fsck -p / + mount -u -o rw /, then changes the symlinks, then mount -u -o ro /). Works perfectly fine for me. The only thing I need to be careful about is to tell mergemaster not to remove that script. Mergemaster's default, unfortunately, is to delete all unknown scripts in /etc/rc.d. Of course I do have a backup copy, so I can easily recover if needed. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "I invented Ctrl-Alt-Delete, but Bill Gates made it famous." -- David Bradley, original IBM PC design team