Sapphiron Posted August 4, 2004 Report Share Posted August 4, 2004 Can anyone explain to me how the runlevels work. I want my mandrake to run a script at startup. I already put the script in the "init.d" folder and made symbolic links from the rc3.d and rc6.d (an example told me to do It this way). I understand what I'm doing up to that point, but I need clarification on two things 1. What is the differences between the run levels 2. Why are all the links named with a K80<filename> or S01<filename>. Quote Link to comment Share on other sites More sharing options...
Sapphiron Posted August 4, 2004 Author Report Share Posted August 4, 2004 Ok I tried this and it did not work. I thing my script wont run from the startup folder. Is there somewhere I can put a command to run the script from it's original location. Note that I want to run it when the pc starts up (before login) Quote Link to comment Share on other sites More sharing options...
Gowator Posted August 4, 2004 Report Share Posted August 4, 2004 quick answer the run levels are 1 single user 2 multi user 3 network 4 unused 5 graphic 6 reboot 0 stopped The scripts in each directory are run alphabetically ... Sxxname since they are always Sxx or Kxx unless the Sxx has the same value as another they run numerically... If they are both S80ascript and S80xscript then the ascript will run first...but obviously S79xscript runs before S80ascript The S means start and the K means kill. If you are accending run levels then you run S scripts and decending K scripts if it starts with any other letter it is ignored! Thus from 3->5 will run S scripts.. these will mainly be the display manager etc. to startx from say 3->2 will be network K scripts to stop not only networking but services dependent on it first.... like httpd or ftpd etc. hope that helps... if not there is an excellent explanation on the IBM site... cybrjackle once linked to it but its a linux article on making linux boot faster... However it has a very good explanation of run levels...I might pop back and link it but try finding it in the meantime... Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted August 4, 2004 Report Share Posted August 4, 2004 Is there somewhere I can put a command to run the script from it's original location. #!/bin/bash cd <path to original location of script> ./<script name> Exactly what are you trying to do with the script? Quote Link to comment Share on other sites More sharing options...
paul Posted August 4, 2004 Report Share Posted August 4, 2004 put the script anywhere you want then run it from the bottom of rc.local Note that I want to run it when the pc starts up (before login) <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
Gowator Posted August 4, 2004 Report Share Posted August 4, 2004 heres the link Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.