Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rc0(ADM) — OpenDesktop 1.0.0y

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

killall(ADM)

rc2(ADM)

shutdown(ADM)

RC0(ADM)


     RC0(ADM)                                   UNIX System V



     Name
          rc0 - run commands performed to stop the operating system


     Syntax
          /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.''

          One system state  requires  this  procedure:  state  0  (the
          system halt state).  Whenever a change to this state occurs,
          the /etc/rc0 procedure is run.  The  entry  in  /etc/inittab
          might read:

               s0:0: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  below 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 shut down.

          The recommended sequence for /etc/rc0 is:

          Stop System Services and Daemons.

               Various system services (such as Remote File Sharing or
               LP Spooler) are gracefully terminated.

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

          Terminate Processes

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

          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 system.

          Unmount All File Systems

               Only the root file system (/) remains mounted.


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


     See Also
          killall(ADM), rc2(ADM), shutdown(ADM)


     (printed 8/23/89)                                  RC0(ADM)

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