Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The scripts linked at /etc/rc0...6.d/ have numbers at the begining right after the letter S/K, so the question is what is order of execution? From the lower to higher or higher to lower? I also would like to know if there is any rules on these number, can I create a script with number 1, 2, ..., 97, 98, or only some specific numbers are allowed?

I'd like to run a script after the system boot and before the system shutdown, but as those scripts needs internet connection to perform its tasks at which runlevel folder should I place it?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

They're run low to high. Here's a good TLDP page on runlevels in general.

You can use whatever number you like. They're sorted by number to give some systems prioroty over others. These are loaded sequentially. It's not event-driven like Upstart.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.