LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   List init scripts command (https://www.linuxquestions.org/questions/linux-newbie-8/list-init-scripts-command-4175501705/)

esfomeado 04-14-2014 03:14 PM

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

TB0ne 04-14-2014 03:36 PM

Quote:

Originally Posted by esfomeado (Post 5152535)
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

esfomeado 04-14-2014 03:41 PM

He didn't teach a thing. He only give you that questions and then you have to send to him the answers.

jpollard 04-15-2014 10:25 AM

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...

TobiSGD 04-15-2014 10:35 AM

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.

TB0ne 04-15-2014 03:02 PM

Quote:

Originally Posted by esfomeado (Post 5152551)
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.

esfomeado 04-15-2014 03:53 PM

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

jpollard 04-15-2014 03:54 PM

Quote:

Originally Posted by esfomeado (Post 5153395)
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?

TB0ne 04-15-2014 03:59 PM

Quote:

Originally Posted by esfomeado (Post 5153395)
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.

jpollard 04-15-2014 04:10 PM

Or heaven forbid - try to run one without parameters even...

esfomeado 04-19-2014 12:44 PM

l0:6:wait:/etc/init.d/rc 6

TB0ne 04-19-2014 04:22 PM

Quote:

Originally Posted by esfomeado (Post 5155606)
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???

esfomeado 04-20-2014 01:25 PM

Quote:

Originally Posted by TB0ne (Post 5155689)
...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

TB0ne 04-20-2014 02:25 PM

Quote:

Originally Posted by esfomeado (Post 5156124)
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.

esfomeado 04-20-2014 02:29 PM

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.


All times are GMT -5. The time now is 08:35 AM.