Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rc2(8) — CLIX 3.1r7.6.28

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

shutdown(8)

inittab(4)



  rc2(8)                              CLIX                              rc2(8)



  NAME

    rc2 - Runs commands performed for multiuser environment

  SYNOPSIS

    /etc/rc2

  DESCRIPTION

    This file is executed with an entry in /etc/inittab and is responsible for
    those initializations that bring the system to a ready-to-use state,
    traditionally state 2, called the multiuser state.

    The actions performed by /etc/rc2 are found in files in the directory
    /etc/rc.d and files beginning with S in /etc/rc2.d.  These files are
    executed by /bin/sh in ASCII sort-sequence order (see FILES for more
    information).  When functions are added that need to be initialized when
    the system goes multiuser, an appropriate file should be added in
    /etc/rc2.d.

    The functions carried out by the /etc/rc2 command and associated
    /etc/rc2.d files include:

    ⊕  Setting and exporting the TIMEZONE variable.

    ⊕  Setting-up and mounting the user (/usr) file system.

    ⊕  Cleaning up (remaking) the /tmp and /usr/tmp directories.

    ⊕  Loading the network interface and ports cards with program data and
       starting the associated processes.

    ⊕  Starting the cron daemon by executing /etc/cron.

    ⊕  Cleaning up (deleting) uucp locks, status, and temporary files in the
       /usr/spool/uucp directory.

    Other functions can be added, as required, to support the addition of
    hardware and software features.

  EXAMPLES

    The following are prototypical files found in /etc/rc2.d.  These files are
    prefixed by an S and a number indicating the execution order of the files.

    1.  An entry for mounting a file system follows:

        MOUNTFILESYS
        # Set up and mount file systems:
        cd /



  2/94 - Intergraph Corporation                                              1






  rc2(8)                              CLIX                              rc2(8)



        /etc/mountall /etc/fstab


    2.  An entry for removing temporary files might read as follows:

        RMTMPFILES
        rm -rf /tmp
        mkdir /tmp
        chmod 777 /tmp
        chgrp sys /tmp
        chown sys /tmp


    3.  An entry for uucp cleanup could read:

        uucp
        # cleanup uucp locks, status, and temporary files
        rm -rf /usr/spool/locks/*


    The file /etc/TIMEZONE is included early in /etc/rc2, thus establishing
    the default time zone for all commands that follow.

  FILES

    Here are some hints about files in /etc/rc.d:

    ⊕  The order in which files are executed is important.  Since they are
       executed in ASCII sort-sequence order, using the first character of the
       filename as a sequence indicator will help keep the proper order.
       Thus, files starting with the following characters would be:

       [0-9]   very early

       [A-Z]   early

       [a-n]   later

       [o-z]   last
    Files in /etc/rc.d that begin with a dot (.) will not be executed.  This
    feature can be used to hide files that are not to be executed for the time
    being without removing them.  The . command can be used only by the
    superuser.  Files in /etc/rc2.d must begin with an S or a K followed by a
    number and the rest of the filename.  Upon entering run level 2, files
    beginning with S are executed with the start option; files beginning with
    K, are executed with the stop option.  Files beginning with other
    characters are ignored.

  EXIT VALUES

    The exit values are not valid.



  2                                              Intergraph Corporation - 2/94






  rc2(8)                              CLIX                              rc2(8)



  RELATED INFORMATION

    Commands: shutdown(8)

    Files: inittab(4)

















































  2/94 - Intergraph Corporation                                              3




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026