Quote:
Originally Posted by
mark54g
Please read the link I submitted. You are wrong, Six. rc.local is executed before anything else
Actually Mark, sixstrings is right. rc.local is generally the last startup script to run at any run level. Your example from the Fedora site spells it out:
"To run a command right after you boot, before anybody logs in, add the command to the file /etc/rc.local:"
The OP asked which runs first, script under rc3.d or scirpt "under" rc.local. I put under in quotes because in the Redhat server I'm looking at right now rc.local is a script, not a directory. On top of that the question is weird because rc.local is one of the scripts that is executed if you go to run level 3.
The scripts executed when a run level is applied have symbolic links in /etc/rc.d/rc<number>.d/ and have a name like S<number><name>. The scripts are executed by /etc/rc.d/rc which, if you look at it, just runs them through a for loop. The are executed in alphabetical order so S01blah gets executed before S02blah which gets executed before S02blat. The symbolic link for rc.local is usually S99local which puts it "near" the end. I say "near" because, while it's inteded to be at the end, it's possible to have scripts execute after it. You can do that by creating a symbolic link named S99<something_aphabetically_after_local>.
MG