I am trying to understand how run levels work. I understand the meaning of the 7 run levels and I understand that they were usually configured by
/etc/inittab, which used to call
/etc/init.d/rc, which itself called the various scripts to configure the different run levels and how they should behave.
Right now I am on an Ubuntu Server machine (12.04) and I see that the
inittab file is not used anymore and that instead, scripts are found in the
Now suppose that I want to execute a script at boot time (for example to launch an application). Usually I would do this editing the
And here comes my question: if I edit this file, will this script run for every run level?
If I want the script to work only at run level 5 for example, should I put this script into the
/etc/rc5.d/ folder instead? Or is there another way to do this?