Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Sep 1995 23:38:24 -0700 (PDT)
From:      Julian Elischer <julian@ref.tfs.com>
To:        gary@palmer.demon.co.uk (Gary Palmer)
Cc:        jehamby@lightside.com, hackers@freebsd.org
Subject:   Re: ports startup scripts
Message-ID:  <199509260638.XAA09131@ref.tfs.com>
In-Reply-To: <2649.812092182@palmer.demon.co.uk> from "Gary Palmer" at Sep 26, 95 06:09:42 am

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> In message <Pine.BSF.3.91.950925212311.608A-100000@localhost>, Jake Hamby write
> s:
> 
> As someone who has ``grown up'' around BSD derrivatives, I still
> scratch my head when asked to work on a Solaris box.
The sysV system is easy to understand  once you realise that 
all it is is haveing a different rc file for each level

SO if you want to go to level 3 you run rc3
simple..
that's all there is to it..

in rc3 you see

f [ -d /sbin/rc3.d ]; then
        for f in /sbin/rc3.d/S*
        do
                if [ -s $f ]; then
                        /sbin/sh $f start
                fi
        done
fi

now exactly how much work does that take to figure out..?
It's simple.. it's elegant and it's DIFFICULT TO FUCK UP!!

S01mountufs@
S03savecore@
S05paging@
S10recpasswd@
S20inet@
S21rc.project@
S22xns@
S30syslog@
S35named@
S40nfsmount@
S45preserve@
S50rmtmpfiles@
S52streams@
S55nfs@
S56amd@
S60sendmail@
S65inetd@
S66supfilesrv@
S67cron@
S68motd@
S69writesrv@
S70lpd@
S74uucp@
S75acct@
S85enlogin@

I'd prefer 3 digits.. it get's a bit crowded in palces with 2

It's So SIMPLE to see the order, and SO SIMPLE TO CHANGE
I used to run my old 386BSD box with this (stolen straight from OSF1)
(the next box across)

it made adding packages so much simpler, and 
removing them was safe.. there was no chance of accidentally removing
one line too many.. Even if we don't use Run levels,
I still think we should addopt this scheme
we can always tailor it with experience..
(add slightly different versions), add a /usr/local/init directory
or whatever.. but let's get a start!
most people acknowledge that having people editing /etc/rc is asking for problems..

> 
> There are several problems to be addressed (hopefully in a calm and
> practical fashion. Who am I trying to kid? :-) ) The key to this
> system working is that you just plop a file in a certain directory,
> which will be run when the system is next booted (or shutdown -
> WHATEVER). This leads to several problems that I can see:
> 
> 1) Who issues these script ID numbers? We cannot let people go
>    claiming their own at random, as they *WILL* clash (even if we let
>    them loose on a number domain with 6 significant digits!)
so what ?
if they clash the get run at around the same time.. (dependig on alpha order)
they will have put themselves after anything that they need to depend on..
that's all that matters!

> 
> 2) Who is responsible for ensuring that they are in the correct order?
>    (e.g. something which loads a LKM is run *AFTER* the script to
>    mount /usr is run). This could potentially be nasty, as the
>    dependancy tree WILL vary over time (and even from machine to
>    machine).
As SYSTEM items  are in KNOWN POSITIONS
in the sequence (e.g. starting the network is at 20 above,)
then if you need neworking, any number above 20 will do..
> 
> 3) How will we cope with local alterations (e.g. someone running
>    locally developed s/w which is only for local use)? Do we leave
>    large gaps in the numbering to allow for local hacks?
not so hard.. you'are unlikely to be dependent on something locally derived..
the rc.project entry above is a local addition.
> 
> Am I missing something basic here?
yes, the fact that it's basic

> 
julian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509260638.XAA09131>