O'Reilly logo

Linux: Embedded Development by Chris Simmonds, Alex González, Alexandru Vaduva

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

BusyBox init

BusyBox has a minimal init program that uses a configuration file, /etc/inittab, to define rules to start programs at boot up and to stop them at shutdown. Usually, the actual work is done by shell scripts which, by convention, are placed in the /etc/init.d directory.

init begins by reading the configuration file, /etc/inittab. This contains a list of programs to run, one per line, with this format:

<id>::<action>:<program>

The role of these parameters is as follows:

  • id: The controlling terminal for the command
  • action: The conditions to run this command, as shown in the following paragraph
  • program: The program to run

The actions are as follows:

  • sysinit: Run the program when init starts, before any of the other types of actions.
  • respawn: Run ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required