Fundamentally it is worthwhile knowing how linux (and most *nixes actual
start). 

( This nutshell description is for Redhat )

Once the kernel has finished loading, the kernel drivers and modules
having the hardware ready to roll, it starts the process "init". As you
might expect it has the process id "1". (Do a "pstree" and you will find
that "init" is the root of the process tree).

"init" knows what to do by reading the config in "/etc/inittab"

If you have a look at that file, you will see that it will launch the
shell script "/etc/rc.d/rc.sysinit", to get things like networking
happening. "init" will then launch the script "/etc/rc.d/rc" (and
telling it the run level that has been asked for, which is normally 5,
to start X11 later).

The "rc" script then basically goes through the appropriate
"/etc/rc.d/rc<<runlevel>>.d" directory (normally rc5.d) and starts the
various subsystems listed there. It so happens that all these scripts
(S* for start and K* for kill,when you shutdown) are just softlinks to
the appropriate command scripts in "/etc/rc.d/init.d". 
"rc" will start the S* scripts in numerical order. 

If the selected runlevel was 5, "init" then starts your preferred X
displaymanager (xdm, gdm or kdm). You are then ready to login.

While "stop" and "start" are the commands used by rc, most "init.d"
scripts also have extra command verbs, such as "restart", that are
generally only used interactively. So by running the "init.d" scripts
you are effectively usurping the role of process number 1. 

Bwa-ha-ha-ha....you have control!



Martin
 

Martin Visser ,CISSP
Network and Security Consultant 
Technology & Infrastructure - Consulting & Integration
HP Services

3 Richardson Place 
North Ryde, Sydney NSW 2113, Australia 
Phone *: +61-2-9022-1670    Mobile *: +61-411-254-513
   Fax 7: +61-2-9022-1800     E-mail * : martin.visserAThp.com



-----Original Message-----
From: Jeff Waugh [mailto:[EMAIL PROTECTED] 
Sent: Sunday, 20 July 2003 1:04 AM
To: Voytek Eymont
Cc: [EMAIL PROTECTED]
Subject: Re: [SLUG] reloading deamons after altering conf: sighup ?


<quote who="Voytek Eymont">

> do I need to _remember_ this path, or, is there a way of working it 
> out from something ?

See Chris's suggestion about the 'service' binary. "/etc/init.d/" is
burned into my muscle memory, and if you're using Linux regularly, it
won't take you very long either. :-)

- Jeff

-- 
linux.conf.au 2004: Adelaide, Australia
http://lca2004.linux.org.au/
 
              Self-assertive pants are filled with confidence.
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to