[plug] Bootup services

Brian Tombleson brian at paradigmit.com.au
Wed Feb 27 17:36:36 WST 2002


<snipped all unwarranted sarcasm>
> Anyway, if you had read it, then you would have read this
>      "If the system is to change to runlevel 1 it will execute:
>           /etc/rc.d/rc3.d/K20nfs stop
>           /etc/rc.d/rc3.d/K50inet stop
>      (assuming nfs and inet do not have start entries in
/etc/rc.d/rc1.d)"
< .. and more unwarranted sarcasm snipped>

You might also have noticed <b>Example:</b> above that and applied some
combination of thought or expereience to realize that it *could* be like
this, or is *could* be different - after all, it wouldn't be an "example" if
it was the only way it happened.

When talking about the location of the scripts it say "These directories are
usually:" .. and noted the meaning of "usually".

When talking about what the run levels are it says "..some of the runlevels
typically found on Linux systems." and noted the meaning of "typically".

When talking about the location of init.d it says "it is most often found in
/etc/rc.d/init.d." and noted the meaning of "most often".

Even when talking about the origins it says "Derived from AT&T's "System V"
Unix" and note the meaning of "Derived".

The major point is that System Packagers (Debian, Corel, RH, Mandrake, SuSE,
etc, etc) have the flexibility to define their own structure.  Beyond this
you (the user) have as much flexibility again to customizie it to your needs
and wants.  You don't *have* to do anything or follow any rules.  Because
your system is different, doesn't mean it's better or worse than any other
system.

Any system boots (or fails) the way it has been programmed to.  MOST
COMMONLY on Linux this is through the run-time configuration of 'init' who's
primary configuration file is MOST COMMONLY coded into the kernal to be
found at /etc/inittab.

I do run Debian, and if your system is different, then follow the kernel
source and subsequent configuration and script files to see what your system
does.  The documentation that comes with your machine is most likely to
descibe in excrutiating detail the default processes - there is no need to
look on the web for "something similar" and then complain that it's not what
yours does.

Mine has the following in /etc/inittab for start-up - follow it an
understand if you will.
# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS

.. and /etc/init.d/rcS is documented to do the following ..
# rcS           Call all S??* scripts in /etc/rcS.d in
#               numerical/alphabetical order.

THEN it continues to follow the inittab configuration:
# The default runlevel.
id:2:initdefault:
.. and moves to runlevel 2.

This processes is, in general terms, handled by the /etc/init.d/rc script
which documents the following:
# rc            This file is responsible for starting/stopping
#               services when the runlevel changes.
#
#               Optimization feature:
#               A startup script is _not_ run when the service was
#               running in the previous runlevel and it wasn't stopped
#               in the runlevel transition (most Debian services don't
#               have K?? links in rc{1,2,3,4,5} )


I can't believe I went to the bother to collate and type this.

- Brian.




More information about the plug mailing list