ports and /etc/rc.d/ [was: Where to put my own startup script]

From: Tobias Roth <roth_at_iam.unibe.ch>
Date: Thu, 27 May 2004 09:37:00 +0200
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.
Received on Wed May 26 2004 - 22:37:49 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:55 UTC