Date: Tue, 17 Jul 2007 12:31:48 +0200 (CEST) From: Oliver Fromme <olli@lurza.secnetix.de> To: freebsd-current@FreeBSD.ORG, marck@rinet.ru, dougb@FreeBSD.ORG Subject: Re: RFT: bin/106642: [patch] Allow excluding certain files from mergemaster (8) Message-ID: <200707171031.l6HAVmDZ088205@lurza.secnetix.de> In-Reply-To: <469BB428.1020200@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707171031.l6HAVmDZ088205>