-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Mastering Embedded Linux Development
By :

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 13. For now, I will briefly introduce BusyBox init
.
The init
program begins by reading the /etc/inittab
configuration file. 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 named rcS
when init
is started. The second line prints the message Please press Enter to activate this console to the console and starts a shell when you press Enter. The leading -
before /bin/ash
means that it will become a login shell, which sources /etc/profile
and $HOME/.profile
before displaying the shell prompt.
One of the advantages of launching the shell like this is that job control...