From owner-freebsd-rc@FreeBSD.ORG Thu May 27 00:37:49 2004 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7AEFE16A4CF; Thu, 27 May 2004 00:37:49 -0700 (PDT) Received: from mailhub01.unibe.ch (mailhub01-skge0.unibe.ch [130.92.9.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 88C8C43D3F; Thu, 27 May 2004 00:37:48 -0700 (PDT) (envelope-from roth@speedy.unibe.ch) Received: from localhost (scanhub02-eth0.unibe.ch [130.92.254.66]) by mailhub01.unibe.ch (Postfix) with ESMTP id F3DF025BC1D; Thu, 27 May 2004 09:37:02 +0200 (MEST) Received: from mailhub01.unibe.ch ([130.92.9.52]) by localhost (scanhub02 [130.92.254.66]) (amavisd-new, port 10024) with LMTP id 32375-08-94; Thu, 27 May 2004 09:37:03 +0200 (CEST) Received: from asterix.unibe.ch (asterix.unibe.ch [130.92.64.4]) by mailhub01.unibe.ch (Postfix) with ESMTP id A24AB25BCEF; Thu, 27 May 2004 09:37:01 +0200 (MEST) Received: from speedy.unibe.ch (speedy [130.92.64.35]) by asterix.unibe.ch (8.11.7p1+Sun/8.11.7) with ESMTP id i4R7b1u05920; Thu, 27 May 2004 09:37:01 +0200 (MET DST) Received: (from roth@localhost) by speedy.unibe.ch (8.12.10+Sun/8.12.9/Submit) id i4R7b0K8016694; Thu, 27 May 2004 09:37:00 +0200 (MEST) Date: Thu, 27 May 2004 09:37:00 +0200 From: Tobias Roth To: Oliver Eikemeier Message-ID: <20040527073700.GA16531@speedy.unibe.ch> References: <40B2B7D4.5040106@users.sourceforge.net> <20040525210812.9728A5D08@ptavv.es.net> <20040526181624.GB55179@empiric.dek.spc.org> <40B5899E.7030506@fillmore-labs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40B5899E.7030506@fillmore-labs.com> User-Agent: Mutt/1.4i X-message-flag: Warning! Using Outlook is insecure and promotes virus distribution. Please use a different email client. X-Virus-checked: by University of Berne cc: freebsd-current@freebsd.org cc: freebsd-rc@freebsd.org Subject: ports and /etc/rc.d/ [was: Where to put my own startup script] X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to /etc/rc.d design and implementation. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 May 2004 07:37:49 -0000 On Thu, May 27, 2004 at 08:24:30AM +0200, Oliver Eikemeier wrote: > > While putting *local* (e.g. not belonging to a port) scripts into rc.local > is > reasonable on -STABLE and -CURRENT, ports should *not* put scripts in > /etc/rc.d. I did this once in an attempt to have OpenLDAP start early, > hoping > for this issue to be resolved fast with PR 56736, but I seems there is no > progress on this one. Sigh. Anyway, although I believe it is legal for a > user to put his own scripts into /etc/rc.d, mergemaster(8) will complain > when it finds them, see PR 64476. let's discuss this a bit more deeply, as i just shed a few thoughts on this yesterday. i discovered that quite a few ports now offer the possibility to have their startup script be (manually) put into /etc/rc.d/ and be started from /etc/rc.conf (on my current system, there are for example gkrellmd, rsyncd, racoon). i see these issues: 1) ports startup scripts use rc.subr and get a common structure (good) 2) with a common structure, rcorder can be used for ports as well (good) 3) /etc/rc.d/ and /usr/etc/rc.d/ get mixed up (bad) 4) ports can be started early in the boot process (good, ie for things like racoon) 5) /etc/rc.conf contains directions about ports and is not just a subset of /etc/defaults/rc.conf anymore (bad, same thing as 3) we tend towards 1) already. once a decision about the other points has been taken, what's left is that all ports are (slowly) converted to this. an update to the porters handbook and after a while, a warning when an old-style startup script will be executed is the way to go. 2) will be very nice. PR 56736 from eik seems to address this very elegantly. ports that need to be started early can be started directly after the dummy PORTS dependency, all others that do not explicitly request a specific startup order should be started at the end of rc.d/. this of course also solves 4). everyone please check out that PR. i think 3) is very bad and that possibility should be undone again (or rather, the specific ports that mention this possibility should be reverted). 5) should not be a problem, since PORTS is located after mountcritremote and a /usr/local/etc/rc.conf should do. now, shouldn't racoon be started before mountcritremote? #$%#!#, i think i just shot myself in the foot. comments please :-) i am sure that can be fixed elegantly as well. cheers, t. From owner-freebsd-rc@FreeBSD.ORG Thu May 27 01:01:54 2004 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C70416A4CE; Thu, 27 May 2004 01:01:54 -0700 (PDT) Received: from fillmore.dyndns.org (port-212-202-49-130.reverse.qsc.de [212.202.49.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id F185043D4C; Thu, 27 May 2004 01:01:53 -0700 (PDT) (envelope-from eikemeier@fillmore-labs.com) Received: from [172.16.0.2] (helo=fillmore-labs.com) by fillmore.dyndns.org with esmtp (Exim 4.34; FreeBSD) id 1BTFpi-000CWe-IB; Thu, 27 May 2004 10:01:49 +0200 Message-ID: <40B5A069.8080909@fillmore-labs.com> Date: Thu, 27 May 2004 10:01:45 +0200 From: Oliver Eikemeier Organization: Fillmore Labs GmbH - http://www.fillmore-labs.com/ MIME-Version: 1.0 To: Tobias Roth References: <40B2B7D4.5040106@users.sourceforge.net> <20040525210812.9728A5D08@ptavv.es.net> <20040526181624.GB55179@empiric.dek.spc.org> <40B5899E.7030506@fillmore-labs.com> <20040527073700.GA16531@speedy.unibe.ch> In-Reply-To: <20040527073700.GA16531@speedy.unibe.ch> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit User-Agent: KMail/1.5.9 cc: freebsd-current@freebsd.org cc: freebsd-rc@freebsd.org Subject: Re: ports and /etc/rc.d/ [was: Where to put my own startup script] X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to /etc/rc.d design and implementation. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 May 2004 08:01:54 -0000 Tobias Roth wrote: > [...] > > 1) ports startup scripts use rc.subr and get a common structure (good) > 2) with a common structure, rcorder can be used for ports as well (good) > 3) /etc/rc.d/ and /usr/etc/rc.d/ get mixed up (bad) You meant /usr/local/etc/rc.d/ here? > 4) ports can be started early in the boot process (good, ie for things like > racoon) > 5) /etc/rc.conf contains directions about ports and is not just a subset of > /etc/defaults/rc.conf anymore (bad, same thing as 3) > > we tend towards 1) already. once a decision about the other points has been > taken, what's left is that all ports are (slowly) converted to this. > an update to the porters handbook and after a while, a warning when an > old-style startup script will be executed is the way to go. > > 2) will be very nice. PR 56736 from eik seems to address this very > elegantly. ports that need to be started early can be started directly after > the dummy PORTS dependency, all others that do not explicitly request a > specific startup order should be started at the end of rc.d/. this of > course also solves 4). You should not really use PORTS, but whatever you need to run. > [...] > > now, shouldn't racoon be started before mountcritremote? #$%#!#, i think > i just shot myself in the foot. comments please :-) i am sure that can > be fixed elegantly as well. The problem here is that /usr might not be a local filesystem, so touching anything there before mountcritremote is not a really good idea. -Oliver From owner-freebsd-rc@FreeBSD.ORG Thu May 27 01:52:36 2004 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5C8F716A4DB; Thu, 27 May 2004 01:52:36 -0700 (PDT) Received: from mailhub02.unibe.ch (mailhub02.unibe.ch [130.92.9.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A4C043D2D; Thu, 27 May 2004 01:52:36 -0700 (PDT) (envelope-from roth@speedy.unibe.ch) Received: from localhost (scanhub01.unibe.ch [130.92.254.65]) by mailhub02.unibe.ch (Postfix) with ESMTP id 37D7276547; Thu, 27 May 2004 10:51:58 +0200 (MEST) Received: from mailhub02.unibe.ch ([130.92.9.53]) by localhost (scanhub01 [130.92.254.65]) (amavisd-new, port 10024) with LMTP id 28658-02-25; Thu, 27 May 2004 10:51:57 +0200 (CEST) Received: from asterix.unibe.ch (asterix.unibe.ch [130.92.64.4]) by mailhub02.unibe.ch (Postfix) with ESMTP id EAF3876511; Thu, 27 May 2004 10:51:13 +0200 (MEST) Received: from speedy.unibe.ch (speedy [130.92.64.35]) by asterix.unibe.ch (8.11.7p1+Sun/8.11.7) with ESMTP id i4R8n4u10965; Thu, 27 May 2004 10:49:04 +0200 (MET DST) Received: (from roth@localhost) by speedy.unibe.ch (8.12.10+Sun/8.12.9/Submit) id i4R8n3kq017263; Thu, 27 May 2004 10:49:03 +0200 (MEST) Date: Thu, 27 May 2004 10:49:03 +0200 From: Tobias Roth To: Oliver Eikemeier Message-ID: <20040527084903.GA17193@speedy.unibe.ch> References: <40B2B7D4.5040106@users.sourceforge.net> <20040525210812.9728A5D08@ptavv.es.net> <20040526181624.GB55179@empiric.dek.spc.org> <40B5899E.7030506@fillmore-labs.com> <20040527073700.GA16531@speedy.unibe.ch> <40B5A069.8080909@fillmore-labs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40B5A069.8080909@fillmore-labs.com> User-Agent: Mutt/1.4i X-message-flag: Warning! Using Outlook is insecure and promotes virus distribution. Please use a different email client. X-Virus-checked: by University of Berne cc: freebsd-current@freebsd.org cc: freebsd-rc@freebsd.org Subject: Re: ports and /etc/rc.d/ [was: Where to put my own startup script] X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to /etc/rc.d design and implementation. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 May 2004 08:52:36 -0000 On Thu, May 27, 2004 at 10:01:45AM +0200, Oliver Eikemeier wrote: > > > >1) ports startup scripts use rc.subr and get a common structure (good) > >2) with a common structure, rcorder can be used for ports as well (good) > >3) /etc/rc.d/ and /usr/etc/rc.d/ get mixed up (bad) > > You meant /usr/local/etc/rc.d/ here? yes > >4) ports can be started early in the boot process (good, ie for things like > > racoon) > >5) /etc/rc.conf contains directions about ports and is not just a subset of > > /etc/defaults/rc.conf anymore (bad, same thing as 3) > > > >we tend towards 1) already. once a decision about the other points has been > >taken, what's left is that all ports are (slowly) converted to this. > >an update to the porters handbook and after a while, a warning when an > >old-style startup script will be executed is the way to go. > > > >2) will be very nice. PR 56736 from eik seems to address this very > >elegantly. ports that need to be started early can be started directly > >after > >the dummy PORTS dependency, all others that do not explicitly request a > >specific startup order should be started at the end of rc.d/. this of > >course also solves 4). > > You should not really use PORTS, but whatever you need to run. i don't understand what you mean by that. i was just trying to briefly describe what your patch from PR 56736 does. maybe i got it wrong? > >now, shouldn't racoon be started before mountcritremote? #$%#!#, i think > >i just shot myself in the foot. comments please :-) i am sure that can > >be fixed elegantly as well. > > The problem here is that /usr might not be a local filesystem, so touching > anything there before mountcritremote is not a really good idea. that is exactly what i wanted to say. since racoon might be needed to mount remote filesystems, and at the same time possibly being located on one, we have a problem. more comments about adapting PR 56736 and reverting 3) ? From owner-freebsd-rc@FreeBSD.ORG Thu May 27 03:22:17 2004 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 44A7B16A4CE; Thu, 27 May 2004 03:22:17 -0700 (PDT) Received: from fillmore.dyndns.org (port-212-202-49-130.reverse.qsc.de [212.202.49.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B7AB43D3F; Thu, 27 May 2004 03:22:14 -0700 (PDT) (envelope-from eikemeier@fillmore-labs.com) Received: from [172.16.0.2] (helo=fillmore-labs.com) by fillmore.dyndns.org with esmtp (Exim 4.34; FreeBSD) id 1BTHzL-000A0g-4J; Thu, 27 May 2004 12:20:31 +0200 Message-ID: <40B5C0B2.7070600@fillmore-labs.com> Date: Thu, 27 May 2004 12:19:30 +0200 From: Oliver Eikemeier Organization: Fillmore Labs GmbH - http://www.fillmore-labs.com/ MIME-Version: 1.0 To: Tobias Roth References: <40B2B7D4.5040106@users.sourceforge.net> <20040525210812.9728A5D08@ptavv.es.net> <20040526181624.GB55179@empiric.dek.spc.org> <40B5899E.7030506@fillmore-labs.com> <20040527073700.GA16531@speedy.unibe.ch> <40B5A069.8080909@fillmore-labs.com> <20040527084903.GA17193@speedy.unibe.ch> In-Reply-To: <20040527084903.GA17193@speedy.unibe.ch> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit User-Agent: KMail/1.5.9 cc: freebsd-current@freebsd.org cc: freebsd-rc@freebsd.org Subject: Re: ports and /etc/rc.d/ [was: Where to put my own startup script] X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to /etc/rc.d design and implementation. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 May 2004 10:22:17 -0000 Tobias Roth wrote: >>>2) will be very nice. PR 56736 from eik seems to address this very >>>elegantly. ports that need to be started early can be started directly >>>after >>>the dummy PORTS dependency, all others that do not explicitly request a >>>specific startup order should be started at the end of rc.d/. this of >>>course also solves 4). >> >>You should not really use PORTS, but whatever you need to run. > > i don't understand what you mean by that. i was just trying to briefly > describe what your patch from PR 56736 does. maybe i got it wrong? PORTS is *very* early in the startup process. Most ports require at least syslogd, so DAEMON or even LOGIN is far more appropriate. If you need to start early, maybe SERVERS is a good choice. >>>now, shouldn't racoon be started before mountcritremote? #$%#!#, i think >>>i just shot myself in the foot. comments please :-) i am sure that can >>>be fixed elegantly as well. >> >>The problem here is that /usr might not be a local filesystem, so touching >>anything there before mountcritremote is not a really good idea. > > that is exactly what i wanted to say. since racoon might be needed to > mount remote filesystems, and at the same time possibly being located on > one, we have a problem. You can't do that by default. If you want to support this you have to hand-tune your configuration. -Oliver