What is the last script to run on Ubuntu server 14.04 LTS and in what file is it called?

0
In previous versions of ubuntu server version 12.04, rc.local was the last boot file to be run, but in higher versions and specifically 14.04 LTS Server, rc.local runs in the middle of the boot process, I am and you need to change this order and insert rc.local as the last startup script to run. Could someone help me?

    
asked by anonymous 03.09.2014 / 13:49

1 answer

1

The official ubuntu documentation says the following:

  

What order are initscripts started and stopped in?

     

If a service has not been converted to upstart, this has not changed; the symlinks are named SNNname or KNNname, where NN is a number from 00 to 99. The K scripts are run first in numerical order, followed by the S scripts in numerical order.

     

However, services which have been converted to upstart will define their start criteria in the file, like this:

     

start on runlevel [2345] stop on runlevel [! 2345]

     Runlevel 2, 3, 4, or 5. It should be noted that it will be started in parallel with every other service that starts on those runlevels, and anything else still starting . The [! 2345] in the stop on means it will be stopped whenever runlevel that is not 2, 3, 4, or 5 is reached.

Then I conclude that there is an upstart service that should be calling your /etc/init.d/rc.local in parallel with other init scripts.

I suggest creating an old-fashioned init script ( sysvinit ) in /etc/rcX.d/S99script , where X is your default runlevel (check yours in /etc/init/rc-sysinit.conf , this should ensure that it will run last.     

18.09.2014 / 16:51