The init program
Running a shell, or even a shell script, at boot time is fine for simple cases, but really you need something more flexible. Normally, Unix systems run a program called init
that starts up and monitors other programs. Over the years, there have been many init
programs, some of which I will describe in Chapter 9, Starting up - the init Program. For now, I will briefly introduce the init
from BusyBox.
init
begins by reading the configuration file, /etc/inittab
. Here is a simple example which is adequate for our needs:
::sysinit:/etc/init.d/rcS ::askfirst:-/bin/ash
The first line runs a shell script, rcS
, when init
is started. The second line prints the message Please press Enter to activate this console to the console, and starts a ...
Get Embedded Linux for Developers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.