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 4 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.

On Pronto platforms, the start-up 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, which 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.

On GSM73xxSO platforms, the start-up sequence is now as follows:

  1. /etc/preinit is run, which starts up /sbin/init.
  2. /etc/inittab has an "sv" entry that calls the /sbin/runsvdir-start shell script.
  3. /sbin/runsvdir-start invokes runsvdir on the /service directory.
  4. /etc/init.d/rcS is invoked, which 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.

Regardless of platform, /etc/system_init performs the following:

  1. /etc/find-env is sourced to set environment variables; these determine what gets executed next.
    1. $config_var is set to persistent configuration directory:
      1. /local/sfs on GSM73xxSO and Pronto 3240 platforms
      2. /local on other Pronto platforms
    2. The following files are searched for in $config_dir, and if not found, those in /etc are used:
      1. rc.soc: initialization script for BCM driver
      2. config.bcm: configuration file for BCM driver
      3. sysenv: may set any of the configuration variables
  2. Overlay is applied (persistent overlay directory is copied to root file system) if it exists.
  3. Additional kernel drivers are loaded.
  4. For out-of-band management, the management interface is configured.
  5. Symlinks to the services in /etc/sv that are to be started are added to /service.
  6. 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.

On both Pronto and GSM73xxSO platforms, the following services are started:

  • dropbear, for ssh access
  • telnetd
  • httpd
  • ofprotocol
  • ofswd

On Pronto platforms only, the fand service is also started to control the fans.

On GSM73xxSO platforms only:

  • the inband-network-cfg service is also started to invoke tap0 configuration after ofswd has been started.
  • the ofswd service is modified with a "finish" script to restart the in band-network-cfg service if necessary.
  • No labels