What is the latest script running on Ubuntu server 14.04 LTS startup and in what file is it called?

Asked

Viewed 254 times

0

In previous versions the Ubuntu server version 12.04, the rc.local was the last boot file to run, but in higher versions and specifically 14.04 LTS Server, the rc.local is executed halfway through the boot process, I am in great need to change this order and insert the rc.local as the last boot script to run. Someone could help me?

1 answer

1

The official Ubuntu document reads as follows::

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]

This Means the service will be Started when the system Reaches 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 a runlevel that is not 2, 3, 4, or 5 is reached.

Then I conclude that there is an upstart service that must be calling your /etc/init.d/rc.local parallel to 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 on /etc/init/rc-sysinit.conf . This should ensure that it will run last.

  • I’ll try and get back. Thank you!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.