LinuxQuestions.org
Help answer threads with 0 replies.
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 04-14-2014, 04:14 PM   #1
esfomeado
LQ Newbie
 
Registered: Apr 2014
Posts: 7

Rep: Reputation: Disabled
List init scripts command


Considering a Debian VM, present an ordered listing of the init scripts (including parameters) when the runlevel switch to 6. Any help? I have tried allot of commands but most of them only list the services like:

ls /etc/rc6.d
 
Old 04-14-2014, 04:36 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,318

Rep: Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881
Quote:
Originally Posted by esfomeado View Post
Considering a Debian VM, present an ordered listing of the init scripts (including parameters) when the runlevel switch to 6. Any help? I have tried allot of commands but most of them only list the services like:

ls /etc/rc6.d
Aside from doing the LS command, what else did your teacher/book tell you? This is a verbatim homework question...and there are plenty of things you can find on Google for this, one good place to start is the Linux Documentation project:

http://www.tldp.org/LDP/sag/html/run-levels-intro.html
 
Old 04-14-2014, 04:41 PM   #3
esfomeado
LQ Newbie
 
Registered: Apr 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
He didn't teach a thing. He only give you that questions and then you have to send to him the answers.
 
Old 04-15-2014, 11:25 AM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
I would suggest you start reading...

You can also read one or two of the init scrips... I image you will find a line that has the options.
You should be able to use a command to pick out just that line...
 
Old 04-15-2014, 11:35 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,131
Blog Entries: 2

Rep: Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833
To see which scripts are run when switching to runlevel X look at /etc/rcX.d.
To see in which order they are run look at the numbers in the names of the links.
The parameters that are used are determined by the first letter of the links name, K is for stopping a service, S is for starting a service.
Keep in mind that only those scripts are run which have to run: If a service is already running and you switch to a runlevel which would also start that service nothing is done. So you need to look at the starting runlevel and the stopping runlevel to determine which scripts are run. In case of runlevel 6 (or 0, for that matter), this is exceptionally easy.
 
Old 04-15-2014, 04:02 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,318

Rep: Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881
Quote:
Originally Posted by esfomeado View Post
He didn't teach a thing. He only give you that questions and then you have to send to him the answers.
Not much point in homework if you don't actually DO the work, is there? Isn't learning the answer the entire POINT of homework/school? And by sending him the answers, that's exactly how you are graded.

Again, go back to some basic research; TLDP has plenty of hints, and you were given a link previously. TobiGSD also gave you a pretty good explanation of things as well.
 
Old 04-15-2014, 04:53 PM   #7
esfomeado
LQ Newbie
 
Registered: Apr 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
I know that scripts with run level 6 are stored on /etc/rc6.d.
I have tried allot of command but all only show the list of the scripts without of the parameters.
I have search for days and nothing and so i decided do ask to someone for help
 
Old 04-15-2014, 04:54 PM   #8
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
Quote:
Originally Posted by esfomeado View Post
I know that scripts with run level 6 are stored on /etc/rc6.d.
I have tried allot of command but all only show the list of the scripts without of the parameters.
I have search for days and nothing and so i decided do ask to someone for help
Did you bother to read the scrips?
 
Old 04-15-2014, 04:59 PM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,318

Rep: Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881
Quote:
Originally Posted by esfomeado View Post
I know that scripts with run level 6 are stored on /etc/rc6.d. I have tried allot of command but all only show the list of the scripts without of the parameters.
jpollard answered this. Re-read the answer.
Quote:
I have search for days and nothing and so i decided do ask to someone for help
The first link I gave you in post #2 tells you what you need, if you tried to read/understand it. If you are having this much trouble with your homework, and have spent DAYS searching (unlikely, since Google pulls up THOUSANDS of hits/answers in less than a second), you need to talk with your teacher, and get some additional help.

Again, the ones with S in front of them are for STARTING a script...the ones with K are for KILLING (stopping). To spoon-feed you an answer, the ones with S have a parameter of "START"...K would be "STOP". Additional flags for services are controlled by configuration file(s) for those services.
 
Old 04-15-2014, 05:10 PM   #10
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
Or heaven forbid - try to run one without parameters even...
 
Old 04-19-2014, 01:44 PM   #11
esfomeado
LQ Newbie
 
Registered: Apr 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
l0:6:wait:/etc/init.d/rc 6
 
Old 04-19-2014, 05:22 PM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,318

Rep: Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881
Quote:
Originally Posted by esfomeado View Post
l0:6:wait:/etc/init.d/rc 6
...and is there a question/answer in this somewhere? What is this, where did it come from, and what do you mean???
 
Old 04-20-2014, 02:25 PM   #13
esfomeado
LQ Newbie
 
Registered: Apr 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
...and is there a question/answer in this somewhere? What is this, where did it come from, and what do you mean???
I just give up.
I have searched for days and nothing. I have found nothing!!!!

on rc6.d are only the symbolic links

Last edited by esfomeado; 04-20-2014 at 02:29 PM.
 
Old 04-20-2014, 03:25 PM   #14
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,318

Rep: Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881Reputation: 3881
Quote:
Originally Posted by esfomeado View Post
I just give up. I have searched for days and nothing. I have found nothing!!!!
You were given the answer SEVERAL times in this thread. Either you didn't read what you were given, or didn't understand it. There's nothing anyone here can do to help you with either of those things.

AGAIN: Scripts starting with S are for STARTING that service. K is for STOPPING.
Quote:
on rc6.d are only the symbolic links
Right...and those symbolic links point to scripts elsewhere on the system. Since different things may be needed in different run-levels, putting multiple copies of the SAME SCRIPT into multiple locations is pointless, and makes things harder to update. Since the symbolic links are treated just like a 'regular' script, you can obviously see them, and obviously know which ones are in the different runlevel directories.

Again, your question has been answered several times. Not much else anyone, anywhere can help you with. If you're having this much trouble, ask your teacher for help.
 
Old 04-20-2014, 03:29 PM   #15
esfomeado
LQ Newbie
 
Registered: Apr 2014
Posts: 7

Original Poster
Rep: Reputation: Disabled
But if i print the symbolic symbols only with S the answer is wrong!
The teacher don't want us to print that symbolic symbols that are on rc6.d that is the problem.
 
  


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
debian emty init scripts /etc/init.d crowl Debian 5 10-16-2012 11:42 AM
[SOLVED] How to monitor init scripts in /etc/init.d/ in rhel 5 me_spearhead Red Hat 2 02-09-2011 11:41 PM
Diffrence /etc/init.d and /etc/init.d/rc?.d scripts veeruhs Linux - Server 3 07-29-2010 05:42 AM
[SOLVED] init scripts, variables in INIT INFO section catkin Linux - General 1 08-18-2009 03:02 PM
Command to list line length of multiple scripts Tekime Linux - General 2 09-06-2002 02:04 AM


All times are GMT -5. The time now is 07:19 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