Bob:
We don't use slackware hence my comment about reading the rc files. In your 
reply you said:
>> In ancient times,
like the 1980s, there was some standardization.  1 was single-user, 2
was multiuser with no network (back when networks were optional), 3
was multiuser with network and/or network filesystems, and 5 was
multiuser with network and the X server.  ("Multiuser" as in time
sharing)  Nowadays, don't count on any of that.<<

Not so ancient as it turns out. That is the documented scheme for Redhat and 
Fedora. It is also true for several commercial varients of *nix.

//jjs



-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Bob Miller
Sent: Mon 3/20/2006 7:16 PM
To: [EMAIL PROTECTED]; Eugene Unix and Gnu/Linux User Group
Subject: Re: [Eug-lug] Slackware processes at startup
 
Matthew Jarvis wrote:

> Trying to document one of the servers here...
> 
> Running Slackware it doesn't seem to have anything to tell me what it 
> loads up when the machine is turned on.

Nobody is saying whether Slackware uses the SysV init mechanism.
Since SysV is traditional, and Slackware is a traditional release,
let's assume it does. (-:  I don't know; I don't use Slack.

/sbin/init (see init(8)*) reads /etc/inittab (see inittab(5)).
/etc/inittab defines the system's default "runlevel" in a line like
this.

        id:3:initdefault:

My default runlevel is 3.

A runlevel is just an identifier, usually a single digit, that
determines how the machine is supposed to start up.  In ancient times,
like the 1980s, there was some standardization.  1 was single-user, 2
was multiuser with no network (back when networks were optional), 3
was multiuser with network and/or network filesystems, and 5 was
multiuser with network and the X server.  ("Multiuser" as in time
sharing)  Nowadays, don't count on any of that.

The runlevel selects other lines in inittab to execute.  There's
probably a line like this for level 3.

        l3:3:wait:/etc/init.d/rc 3

/etc/init.d/rc is a shell script.  You can read it and understand it,
or you can take my word that it's going to scan the directory
/etc/rc3.d (if your runlevel is 3) for scripts starting with "S" and
run them in alphabetical/numerical order.  Most of those scripts start
a daemon.  So "ls /etc/rc3.d" shows what gets started, and in
what order.

$ ls -F /etc/rc3.d
S10sysklogd@     S20exim@               S20postgresql@  S89atd@
S11klogd@        S20gpm@                S20privoxy@     S89cron@
S12kerneld@      S20inetd@              S20samba@       S91apache@
S14ppp@          S20logoutd@            S20ssh@         S91apache-ssl@
S19nfs-common@   S20lpd@                S20xfs@         S99folding@
S20apache-perl@  S20makedev@            S20zope@        S99rmnologin@
S20apmd@         S20mysql@              S23ntp@         S99slimp3@
S20cupsys@       S20nfs-kernel-server@  S50wu-ftpd@     S99xdm@

You can see that they're tidily ordered with two digit sequence
numbers.  The "@" shows that they're all symbolic links.  The files
they link to are stored in /etc/init.d or maybe /etc/rc.d/init.d,
depending on your distribution.  They're invoked with one argument,
the word "start".  So on my system, /etc/init.d/rc will invoke

        # /etc/rc3.d/S10sysklogd start
        # /etc/rc3.d/S11klogd start
        et cetera.

Those are all shell scripts too, so you can read and understand them
as well.

There is some other stuff going on too.  Before init invokes the
command for level 3, it invokes the boot-level command.  On my box,
that's this line.

        si::sysinit:/etc/init.d/rcS

It's another shell script.  It does stuff that's common for all
runlevels and that needs to be done early.

Also, your console logins are triggered from inittab.  You'll have
some number of lines like this.  Usually, you'll have six and the
X server, if any, will be on VT7.**

        1:2345:respawn:/sbin/getty 38400 tty1
        2:23:respawn:/sbin/getty 38400 tty2
        3:23:respawn:/sbin/getty 38400 tty3
        ...

getty is the program that prompts you to type your username and
password.  It invokes login, and login starts your login shell.  Prior
to the X server and network logins (telnet, rlogin, ssh), that's how
everybody logged into a Unix box.  We still use getty for the non-X
consoles and for any serial lines that allow login.  (Oddly enough, I
logged in on a serial console just this morning, for the second time
in three years.)

Anyway, 

* You probably know by now that the notation word(number) means the
  "word" manual page in section "number", and that you view the man page
  by typing "man <number> <word>".  In this case, "man 8 init".

** You also probably know that you can switch between virtual
   consoles.  Press <CTRL><ALT><number> where number is 1 through 7 and
   you'll see six login prompts and an X server.  On most distributions.
   It's a poor man's window system when you can't use X.

-- 
Bob Miller                              K<bob>
                                        [EMAIL PROTECTED]
_______________________________________________
EUGLUG mailing list
[email protected]
http://www.euglug.org/mailman/listinfo/euglug

<<winmail.dat>>

_______________________________________________
EUGLUG mailing list
[email protected]
http://www.euglug.org/mailman/listinfo/euglug

Reply via email to