LinuxQuestions.org
Review your favorite Linux distribution.
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 12-16-2010, 11:47 AM   #1
Nickjpost
LQ Newbie
 
Registered: Dec 2010
Location: Boulder, CO
Distribution: Ubuntu
Posts: 27

Rep: Reputation: 0
Question Runlevel scripts and creating links


Hello all!
I am a new Linux user and also a student learning about Linux systems, primarily Fedora 12 (the distro the school is on). I'm am having some trouble understanding some things on my homework and am asking for help.

So far: I have learned without a doubt what runlevels are...the questions I have are related to the init scripts and how to create a link to an init script. I see that there was a post where someone was trying to get people to do homework for them...I assure you I want to understand what I am trying to learn. That said, here are my hang ups:
1. The script that contains the default runlevel to my understanding is /etc/rc.d/init.d, though I've also found /etc/inittab on the web as the default. My book isn't too clear on this as it doesn't state it exactly, so which is it for sure?
2. My assignment asks what I'd name a link to an init script that would start a fictitious BIGD daemon early on in the boot process. My answer: /etc/rc.5.bigd.d --I don't think that this is the right answer though because in the book, it states that the /etc/rc.d/rcN.d contains names of scripts whose names begin with K and S. My understading in that this starts and kills each script depending on how it's entered. Is it here, then, that the above stated question is referring? I don't really understand, so if you could please help clarify where I may be wrong. Also how in the world would I name a link to kill this "daemon"? It also talks about a service command that can be used to manually kill it, but I don't know what that is.
Please, I really want to understand this and my textbook serves as additional confusion; any insight is welcome!
Thank you in advance everyone!

-Nick
 
Old 12-16-2010, 02:53 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hi, welcome to LQ!
Quote:
Originally Posted by Nickjpost View Post
1. The script that contains the default runlevel to my understanding is /etc/rc.d/init.d, though I've also found /etc/inittab on the web as the default. My book isn't too clear on this as it doesn't state it exactly, so which is it for sure?
Inittab is not a startup-script. It's a config file.
Code:
man inittab
for details.
/etc/rc.d/init.d is not a startup-script, it's a directory
that contains startup-scripts.
Read the script /etc/rc.d/rc to see how the init process works
(unfortunately I have to admit that the script/docu in SuSE
is far superior to FC's version).

Quote:
Originally Posted by Nickjpost View Post
2. My assignment asks what I'd name a link to an init script that would start a fictitious BIGD daemon early on in the boot process. My answer: /etc/rc.5.bigd.d --I don't think that this is the right answer though because in the book, it states that the /etc/rc.d/rcN.d contains names of scripts whose names begin with K and S. My understading in that this starts and kills each script depending on how it's entered. Is it here, then, that the above stated question is referring? I don't really understand, so if you could please help clarify where I may be wrong. Also how in the world would I name a link to kill this "daemon"? It also talks about a service command that can be used to manually kill it, but I don't know what that is.
Please, I really want to understand this and my textbook serves as additional confusion; any insight is welcome!
Thank you in advance everyone!

-Nick
Read what I suggested in 1.), and then revisit/rephrase 2.)



Cheers,
Tink
 
1 members found this post helpful.
Old 12-16-2010, 02:57 PM   #3
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Hi Nickjpost and welcome to LQ,
Quote:
Originally Posted by Nickjpost View Post
...I see that there was a post where someone was trying to get people to do homework for them...I assure you I want to understand what I am trying to learn...
your question shows that you've done your work in trying to understand the matter, so it won't be a problem to point you in the right direction.
Quote:
1. The script that contains the default runlevel to my understanding is /etc/rc.d/init.d, though I've also found /etc/inittab on the web as the default. My book isn't too clear on this as it doesn't state it exactly, so which is it for sure?
The problem is, that these things are very difficult to learn in the theory, I'd recommend to install Fedora and look by yourself at the scripts. I don't know Fedora, and here in Slackware the things seem slightly different.
The /etc/inittab file contains the configuration of the runlevels, for example in which runlevel the users login, mostly either runlevel 3 (multiuser without a gui) or runlevel 5 (with a gui/X11).
Quote:
2. My assignment asks what I'd name a link to an init script that would start a fictitious BIGD daemon early on in the boot process. My answer: /etc/rc.5.bigd.d --I don't think that this is the right answer
as I wrote, I don't know Fedora, you may look at this link http://docs.fedoraproject.org/en-US/...down-init.html, the numbers at the beginning of the filename are the order in which the scripts are executed. Try google with "fedora init scripts" for example.

Markus
 
1 members found this post helpful.
Old 12-16-2010, 04:29 PM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,892
Blog Entries: 27

Rep: Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183
Hi,

@OP

I come from academia and interaction with students that had problems was beneficial when the student approached with difficulties. That way I could provide extended information that may not be available within the text. In this way the student could be guided to information or even hands on interaction to show the student things that would lead to understanding.

A true educator would not look down on someone who has questions concerning the topic. This interaction with the instructor builds understanding for the student that is lacking in certain areas.

Now that has been said.
Quote:
LQ Rules
Do not expect LQ members to do your homework - you will learn much more by doing it yourself.
Does not say that we cannot aid you with homework. But it is best to do it yourself in order to learn. I'll give you a few links to help you help yourself since you feel the provided text is lacking;
Rute Tutorial & Exposition
Getting Started with Linux

The Linux Documentation Project is the mother load for Gnu/Linux information.




 
1 members found this post helpful.
Old 12-16-2010, 09:42 PM   #5
Nickjpost
LQ Newbie
 
Registered: Dec 2010
Location: Boulder, CO
Distribution: Ubuntu
Posts: 27

Original Poster
Rep: Reputation: 0
Solution!

Thank you all for the info, I believe I learned the information I needed, but please let me know if I'm wrong:

The script that contains the default runlevel is in /etc/inittab and the scripts for each runlevel are contained in the /etc/rc.d/rc(runlevel#).d
You can create a new link to start early in the boot process by entering S10bigdd,kill it by entering K90bigdd
 
Old 12-16-2010, 11:24 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Looking good. Just make sure you choose sensible numbers, your
daemon may depend on other daemons work.


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Which set of runlevel scripts does slackware use at boot? okos Slackware 14 05-03-2008 09:20 PM
runlevel shell scripts sebastian.raghe Debian 4 04-15-2005 03:26 PM
Runlevel start/stop scripts vanalex Linux - General 0 01-27-2004 09:54 PM
Slack; Where are the runlevel scripts? GAVollink Slackware 4 11-10-2003 10:21 AM
Creating message after logging into runlevel 3. darksky Red Hat 6 09-01-2003 09:22 PM

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

All times are GMT -5. The time now is 06:23 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration