Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

killall(8)

rc2(8)

shutdown(8)



  rc0(8)                              CLIX                              rc0(8)



  NAME

    rc0 - Runs commands performed to stop the operating system

  SYNOPSIS

    /etc/rc0

  DESCRIPTION

    This file is executed at each system state change that needs to have the
    system in an inactive state.  It is responsible for those actions that
    bring the system to a quiescent state, traditionally called ``shutdown''.

    There are three system states that require this procedure.  They are state
    0 (the system halt state), state 5 (the firmware state), and state 6 (the
    reboot state).  Whenever a change to one of these states occurs, the
    /etc/rc0 procedure is run.  The entry in /etc/inittab might read:

    s0:056:wait:/etc/rc0 >/dev/console 2>&1 </dev/console

    Some of the actions performed by /etc/rc0 are carried out by files in the
    directory /etc/shutdown.d and files beginning with K in /etc/rc0.d.  These
    files are executed in ASCII order (see FILES for more information),
    terminating some system service.  The combination of commands in /etc/rc0
    and files in /etc/shutdown.d and /etc/rc0.d determines how the system is
    shutdown.

    The recommended sequence for /etc/rc0 is:

    1.  Stop System Services and Daemons.

        Various system services (such as 3BNET Local Area Network or LP
        Spooler) are gracefully terminated.

        When new services are added that should be terminated when the system
        is shutdown, the appropriate files are installed in /etc/shutdown.d
        and /etc/rc0.d.

    2.  Terminate Processes

        The SIGTERM signals are sent to all running processes by killall(8).
        Processes stop themselves cleanly if sent SIGTERM.

    3.  Kill Processes

        SIGKILL signals are sent to all remaining processes; no process can
        resist SIGKILL.

        At this point the only processes left are those associated with
        /etc/rc0 and processes 0 and 1, which are special to the operating



  2/94 - Intergraph Corporation                                              1






  rc0(8)                              CLIX                              rc0(8)



        system.

    4.  Unmount All File Systems

        Only the root file system (/) remains mounted.

    Depending on which system state the systems end up in (0, 5, or 6), the
    entries in /etc/inittab will direct what happens next.  If the
    /etc/inittab has not defined any other actions to be performed, as in the
    case of system state 0, then the operating system will have nothing to do.
    It should not be possible to get the system's attention.  The only
    possible actions at this point are to turn off the power or perhaps get
    the attention of a firmware monitor.  The rc0 command can be used only by
    the superuser.

  EXAMPLES

    The /etc/rc0 is invoked through /etc/inittab.  The entry in /etc/inittab
    might be:

    s0:056:wait:/etc/rc0 >/dev/console 2>&1 </dev/console


  FILES

    The execution by /bin/sh of any files in /etc/shutdown.d occurs in ASCII
    sort sequence.  See rc2(8) for more information.

  EXIT VALUES

    The exit values are not valid.

  RELATED INFORMATION

    Commands: killall(8), rc2(8), shutdown(8)



















  2                                              Intergraph Corporation - 2/94




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