runit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

runit.8.html (3175B)


      1 
      2 
      3 
      4 <html>
      5 <head>
      6 <title>runit(8) manual page</title>
      7 </head>
      8 <body bgcolor='white'>
      9 <a href='http://smarden.org/pape/'>G. Pape</a><br><a href='index.html'>runit</A><hr><p>
     10 
     11 <h2><a name='sect0'>Name</a></h2>
     12 runit - a UNIX process no 1 
     13 <h2><a name='sect1'>Synopsis</a></h2>
     14 <b>runit</b> 
     15 <h2><a name='sect2'>Description</a></h2>
     16 <b>runit</b> must be run
     17 as Unix process no 1. It performs the system&rsquo;s booting, running, and shutdown
     18 in three stages: 
     19 <h2><a name='sect3'>Stage 1</a></h2>
     20 <b>runit</b> runs <i>/etc/runit/1</i> and waits for it to terminate.
     21 The system&rsquo;s one time tasks are done here. <i>/etc/runit/1</i> has full control
     22 of <i>/dev/console</i> to be able to start an emergency shell if the one time
     23 initialization tasks fail. If <i>/etc/runit/1</i> crashes, or exits 100, <b>runit</b>
     24 will skip stage 2 and enter stage 3. 
     25 <h2><a name='sect4'>Stage 2</a></h2>
     26 <b>runit</b> runs <i>/etc/runit/2</i>, which
     27 should not return until system shutdown; if it crashes, or exits 111, it
     28 will be restarted. Normally <i>/etc/runit/2</i> starts <i><b>runsvdir</b>(8)</i>. <b>runit</b> is able
     29 to handle the ctrl-alt-del keyboard request in stage 2, see below. 
     30 <h2><a name='sect5'>Stage 3</a></h2>
     31 If
     32 <b>runit</b> is told to shutdown the system, or stage 2 returns, it terminates
     33 stage 2 if it is running, and runs <i>/etc/runit/3</i>. The systems tasks to shutdown
     34 and possibly halt or reboot the system are done here. If stage 3 returns,
     35 <b>runit</b> checks if the file <i>/etc/runit/reboot</i> exists and has the execute by
     36 owner permission set. If so, the system is rebooted, it&rsquo;s halted otherwise.
     37 
     38 <h2><a name='sect6'>Ctrl-alt-del</a></h2>
     39 If <b>runit</b> receives the ctrl-alt-del keyboard request and the file
     40 <i>/etc/runit/ctrlaltdel</i> exists and has the execute by owner permission set,
     41 <b>runit</b> runs <i>/etc/runit/ctrlaltdel</i>, waits for it to terminate, and then sends
     42 itself a CONT signal. 
     43 <h2><a name='sect7'>Signals</a></h2>
     44 <b>runit</b> only accepts signals in stage 2. <p>
     45 If <b>runit</b>
     46 receives a CONT signal and the file <i>/etc/runit/stopit</i> exists and has the
     47 execute by owner permission set, <b>runit</b> is told to shutdown the system. <p>
     48 if
     49 <b>runit</b> receives an INT signal, a ctrl-alt-del keyboard request is triggered.
     50 
     51 <h2><a name='sect8'>See Also</a></h2>
     52 <i>runit-init(8)</i>, <i>runsvdir(8)</i>, <i>runsvchdir(8)</i>, <i>sv(8)</i>, <i>runsv(8)</i>, <i>chpst(8)</i>,
     53 <i>utmpset(8)</i>, <i>svlogd(8)</i> <p>
     54 <i>http://smarden.org/runit/</i> 
     55 <h2><a name='sect9'>Author</a></h2>
     56 Gerrit Pape &lt;pape@smarden.org&gt;
     57 <p>
     58 
     59 <hr><p>
     60 <a name='toc'><b>Table of Contents</b></a><p>
     61 <ul>
     62 <li><a name='toc0' href='#sect0'>Name</a></li>
     63 <li><a name='toc1' href='#sect1'>Synopsis</a></li>
     64 <li><a name='toc2' href='#sect2'>Description</a></li>
     65 <li><a name='toc3' href='#sect3'>Stage 1</a></li>
     66 <li><a name='toc4' href='#sect4'>Stage 2</a></li>
     67 <li><a name='toc5' href='#sect5'>Stage 3</a></li>
     68 <li><a name='toc6' href='#sect6'>Ctrl-alt-del</a></li>
     69 <li><a name='toc7' href='#sect7'>Signals</a></li>
     70 <li><a name='toc8' href='#sect8'>See Also</a></li>
     71 <li><a name='toc9' href='#sect9'>Author</a></li>
     72 </ul>
     73 </body>
     74 </html>