Startup Scripts

A common task for many shell programmers is writing system startup scripts. In this section, you will develop a basic system startup script that can be reused (after a little editing). Before you begin, let's look at a little background into the UNIX system startup and initialization.

System Startup

When a UNIX system starts, the first program to be executed is init (usually located in /sbin). This program is responsible for system startup and initialization. In early versions of UNIX, init was aided in this by the script /etc/rc. This script handled all of the nitty-gritty details of system initialization such as checking the disks, starting the networking layers, and enabling console and remote login programs.

When a system ...

Get Sams Teach Yourself Shell Programming in 24 Hours, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.