This question is about Debian, but I guess it's the same in many linux environments.
/etc/init.d directory defines the services that run at boot-time. As I see it, there are two mechanisms that define who runs and when:
- runlevel directories - The
/etc/rcN.d/directories, in which there are symlinks to scripts in
init.dwith numbers that define the running order. These symlinks are generated from running
- insserv files -
.depend.start/stop/bootfiles that are generated from the utility
insserv. In these files you see the running scripts under
TARGETS, and the order in which they appear is the running order (See this post)
So first question - Which of these decides the boot order?
In order to change the boot order I guess you can either edit the symlinks name in the
rc.N directories, or change the order of appearence in
.depend.start. But both of these changes will be overwritten by a call to
So second question - How do you control the boot order init.d scripts in a way that will last after a call to