Name

rc - Command script for automatic restart

Syntax

$/etc/rc

Description

Rc is a command script that controls the restart process after the system has been rebooted. When the system is restarted and successfully initialized, control is passed to the rc script, which runs under csh. Rc performs its tasks, chains to rc2 is present in $/etc, and when done, control returns to login which waits for system events.

Rc2 typically contains commands that prepare the system for proper operation, such as copying files from fixed disk drives into faster RAM disks, mounting and/or unmounting devices, system maintenance, and so on. Rc should not be modified if possible. Rc2 can be modified as desired.

The runtime performance of many applications can be increased by copying key files from a relatively slow fixed disk into a high-speed RAM disk. The path to a RAM disk is normally assigned to the shell variable “tmpdir”. So, rc2 may begin by copying the following files as shown:

echo rc: copying files to $tmpdir cp $/etc/aliases $tmpdir # for sendmail cp $/etc/paths $tmpdir # for sendmail cp $/etc/plush.m $tmpdir # for plush cp $/bin/plush $tmpdir # for plush cp $/etc/cshrc $tmpdir # for csh cp $/bin/cshx $tmpdir # for csh cp $/bin/csx $tmpdir # for cs cp $/sys/modules/parse $tmpdir # for shells echo rc: file copying completed

Check the manual entries for other applications to see if they take advantage of having their files reside on a RAM disk.

See Also

boot(ADM), csh(C), scripts(M), startup(ADM)