Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

As of the 2012.03.19 Indigo release in March 2012, the initialization sequence was changed to use the runit services framework provided by busybox.

The sequence is now as follows:

  1. /etc/inittab has an "sv" entry that calls the /sbin/runsvdir-start shell script.
  2. /sbin/runsvdir-start invokes runsvdir on the /service directory.
  3. /etc/rc.sh is invoked.

/etc/rc.sh performs the following:

  1. Kernel drivers are loaded.
  2. indigo-preinit.sh is sourced if it exists.
  3. /etc/system_init is run if it exists.

/etc/system_init performs the following:

  1. Overlay is applied if it exists.
  2. Additional kernel drivers are loaded.
  3. For out-of-band management, the management interface is configured.
  4. Symlinks to the services in /etc/sv that are to be started are added to /service.
  5. indigo-postinit.sh is sourced if it exists.

Because runsvdir invokes only those services in /service, the presence or absence of symlinks within /service allows us to control which services are started.

For each service in /service, runsvdir invokes runsv, which in turn invokes /service/<service_name>/run.  Because runsvdir uses readdir() to walk the /service directory, services are not started in any explicit order.

Each service is invoked from its respective "run" script. As required by runsv, each service is configured run in the foreground and log to stdout.

For each service that requires logging, the /service/<service_name> directory contains a "log" subdirectory:

  • /service/<service_name>/log/config is the log configuration file that controls the number of log files and their size
  • /service/<service_name>/log/run is a shell script that takes care of copying the log configuration file from /etc/sv/<service_name>/log and starting up the actual logging process svlogd.
  • No labels