LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-16-2005, 08:24 AM   #1
bruse
Member
 
Registered: Feb 2005
Location: internet
Distribution: Debian
Posts: 821

Rep: Reputation: 30
where is the script that loads the services


HI,
i am using mandrake linux 10.0.i need to know the file that load the services during boot up.
and also during boot a word like [ O K ] AND [ FAILED ]
will come may i know where is that file......
 
Old 02-16-2005, 08:52 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

I already answered the second part (your old post....):

http://www.linuxquestions.org/questi...hreadid=288813

Last answer. ( #5 )

The scripts, not one file, itself reside in /etc/rc.d/init.d, the S*/K* scripts reside in rcX.d (X being the runlevel).
 
Old 02-16-2005, 09:08 AM   #3
bruse
Member
 
Registered: Feb 2005
Location: internet
Distribution: Debian
Posts: 821

Original Poster
Rep: Reputation: 30
yeah,
i saw that where i did not get that.
is there any idea..
 
Old 02-16-2005, 11:59 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi again,

Before I start, please use the same thread if something is not clear

Now, lets give this another try.

Quote:
i am using mandrake linux 10.0.i need to know the file that load the services during boot up.
The services are not started by 1 file, there are several (take a look at /etc/rc.d/init.d). All (most) services have an init script specific for that service (ie: sshd for the ssh daemon, sysklogd for the syslog daemon). The runlevel you boot into determines which services are started. That's why there are rcX.d directories (/etc/rc.d/rc5.d for example) with files starting with S (start) and/or K (stop/kill).

The above is a very simplistic view. For a more detailed explanation take a look at these:

man 8 init
http://www.freeos.com/printer.php?entryID=3243
http://www.redhat.com/docs/manuals/l...-shutdown.html Old, but not much has changed in the boot process.

There's a lot more info about this subject on the net.

Quote:
also during boot a word like [ O K ] AND [ FAILED ] will come may i know where is that file......
In the directory /etc/rc.d/init.d is a file called functions. The words OK and FAILED (among a lot of other things) are generated by this script. This file called functions is parsed ('activated') by an init script (could look something like this: . /etc/rc.d/init.d/functions).

Because most init scripts do, on a basic level, the same thing (start something, stop something, did the start/stop finish with/without an error etc, etc) it was decided to make one script (functions) instead of putting the same code in all the init scripts. All the functionality from the functions script is accessible from within the init script after you parse ('activate') it.

Be sure to have a good understanding of the init process, runlevels and shellscripting before you start changing/deleting/adding these files.You could render (part of) your linux box useless!!. You have been warned

Hope this clears things up a bit.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
diskette loads but can't see the CD bobby_hawk VectorLinux 3 07-02-2005 11:38 AM
GUI never loads dbernat32 Mandriva 1 03-31-2005 07:22 PM
Slackware: What is the script that activates/desactivates services? jayhel Slackware 3 12-23-2004 01:22 PM
installed dropline, root loads kde3.2, user loads drop pgrimes Linux - Software 7 06-28-2004 06:11 PM
TightVNC Ver terminal Services.. also looking for terminal Services for linux 2782d4 Linux - Security 3 05-20-2004 02:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration