Sam MacDonald wrote:

>Thank you for not only fixing an annoyance but leading me down the path 
>of understanding Linux in a more subtle and in depth way.

It may be best to not fix something when it really isn't broken.

On my laptop with a pcmcia ethernet card and SuSE GNU/Linux 8.0 loaded,
I get the following messages when booting to init level 5 (graphical
login).  These are found in /var/log/boot.msg after booting the laptop
as well as on the console display (in possibly less detail) whiling
booting.

------
<notice>/etc/init.d/rc5.d/S05network start
Setting up network interfaces:
    lo	            done

    eth-pcmcia-0    skipped

INFO:   Dont worry about skipped interfaces; they will be set up
        dynamically by service pcmcia, hotplug or when dialing.
------

When the pcmcia process is started via "/etc/init.d/rc5.d/S08pcmcia
start", it does indeed initialize eth-pcmcia-0 and eth0.  If the Redhat
distribution doesn't issue the above INFO notice about skipped
interfaces it probably should.

Reordering the way that (System V) init controlled processes are started
and killed in the various run levels is best left to people who are
experts at this and understand all the side effects of doing so.  BTW, I
don't consider myself an expert in this area, but I'm aware of the
potential dangers of reordering the starting and killing of these
processes.

In this case, since the change in order was only from 08 to 04, the
potential ill effects are quite limited depending on what else gets
started (and later killed) between these (S04-S08 starting scripts).

Changing pcmcia from 08 to 04 does have the effect of there being no lo
interface initialized yet (05), syslog hasn't been started yet (06), and
hotplug hasn't started yet (07), when the pcmcia process is started.
The side effects caused by making this change seem quite small, but they
are there and in certain circumstances could be a (perhaps trivial)
problem.  (Again detailed mentioned are based on SuSE GNU/Linux 8.0.)

>Jack Ungerleider wrote:

Jack did indeed write an excellent description how init does its job of
killing and starting init run level controlled processes.

>>(Note: I'm not certain that Red Hat is setup this way but I believe it is. I 
>>am certain that SuSE runs this way as do a couple of other distros.)

>>There is a directory /etc/init.d (it may be /etc/rc.d/init.d) that contains 
>>many script files that are used to start all the services on the system. 

Clarification: init doesn't _directly_ start all services on a system.
It starts and kills all processes with symbolic links (S??.* and K??.*)
from /etc/rc.d/rc?.d/ to the /etc/rc.d/init.d init process (rc) scripts. 
Some services are started by processes other than init.  Of course, init
usually being the first process does at least indirectly start all
processes except itself (the kernel does that).

>>Each run level has a directory rcX.d where X is the run level (ex. rc3.d if 
>>you are booting to console, rc5.d to the GUI login.) In each of these 
>>directories are a series of sym-links that point to the scripts in init.d 
>>Each of the symlinks has K?? or S?? in front of the script name. The ?? is a 
>>two digit number. This puts the scripts in the directory into a particular 
>>order. 

>>When the run level is entered all of the scripts are run in order. The K 
>>scripts stop running processes and the S scripts start processes. The
>>scripts in the init.d directory often take several parameters two of
>>which are "start" and "stop". If you look at rc0.d and rc6.d (halt and
>>reboot) you will see K scripts and not S scripts. 

>>So what you want to do is change the number of S??pcmcia to be less than 
>>S??network. I'm writing this from a desktop without PCMCIA but with hotplug 
>>(which handles USB, so it would have a similar effect with a USB ethernet 
>>device). Network start is S05network, hotplug is S07hotplug. Basically all 
>>that is needed is to change the S07 to S04 and hotplug will start before 
>>network. 

To be consistent within a run level, when one reorders a start script,
the kill script should also be reordered.  So (on SuSE GNU/Linux 8.0) ...

/etc/rc.d/rc5.d/ # mv S08pcmcia S04pcmcia

should be matched by the corresponding kill script change:

/etc/rc.d/rc5.d/ # mv K15pcmcia K19pcmcia

This kill script reordering is done to ensure that processes in a run
level are killed in the reverse order to which they were started.
Since pcmcia is started a little earlier, it should now also be killed a
little later so a first started - last killed order is maintained.
This isn't strictly necessary, but some init controlled processes do need
other init controlled processes to be running whenever they are running,
so at least a partial ordering determined by interprocess dependencies
is required.

Again, let me say that I wouldn't make this change (or pair changes) to
remove an annoyance displayed by init on the console.  This particular
change may have at most a trivial ill effect, but I would strongly
advise against making any reordering where the side effects are not
clearly understood.

Sincerely,

Ken Fuchs <kfuchs at winternet.com>

_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list