summary refs log tree commit diff
diff options
context:
space:
mode:
authorGerrit Pape <pape@smarden.org>2003-10-29 11:19:03 +0000
committerGerrit Pape <pape@smarden.org>2003-10-29 11:19:03 +0000
commit2762f72fe4238827235a2e1249955aeff030a7fb (patch)
tree0aca719ef8e83c2b13179745121d210ec76e28a5
parent72dfd7484b220331a212f19699db782a45bbae85 (diff)
downloadrunit-2762f72fe4238827235a2e1249955aeff030a7fb.tar.gz
runit-2762f72fe4238827235a2e1249955aeff030a7fb.tar.xz
runit-2762f72fe4238827235a2e1249955aeff030a7fb.zip
* doc/benefits.html, doc/index.html, doc/replaceinit.html,
    doc/runlevels.html, doc/useinit.html: default service directory is
    /var/service; minor.
  * etc/2, etc/debian/3, etc/freebsd/3, etc/macosx/StartupItems/runit,
    etc/openbsd/3, man/runsv.8, man/runsvchdir.8, man/runsvdir.8: default
    service directory is /var/service.
-rw-r--r--doc/benefits.html2
-rw-r--r--doc/index.html60
-rw-r--r--doc/replaceinit.html35
-rw-r--r--doc/runlevels.html14
-rw-r--r--doc/useinit.html6
-rwxr-xr-xetc/22
-rwxr-xr-xetc/debian/34
-rwxr-xr-xetc/freebsd/32
-rwxr-xr-xetc/macosx/StartupItems/runit2
-rwxr-xr-xetc/openbsd/34
-rw-r--r--man/runsv.813
-rw-r--r--man/runsvchdir.84
-rw-r--r--man/runsvdir.85
-rw-r--r--package/CHANGES6
14 files changed, 80 insertions, 79 deletions
diff --git a/doc/benefits.html b/doc/benefits.html
index f34260a..24d2fcf 100644
--- a/doc/benefits.html
+++ b/doc/benefits.html
@@ -167,7 +167,7 @@ sysvinit</a>.
 Stage 2 already is packaging friendly:
 all a software package that provides a service needs to do is to include
 a <i>service directory</i> in the package and to provide a symbolic link
-to this directory in <tt>/service/</tt>.
+to this directory in <tt>/var/service/</tt>.
 The service will be started within five seconds.
 The package's install and update scripts can use the reliable control
 interface to stop, start, restart, or send signals to the service.
diff --git a/doc/index.html b/doc/index.html
index a34991f..76136c4 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -42,10 +42,10 @@
 replacement for
 <a href="ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/">sysvinit</a>
 and other init schemes. <i>runit</i> runs on <b>GNU/Linux</b>,
-<b>OpenBSD</b>, <b>FreeBSD</b>, <b>MacOSX</b>, and can easily be adapted to
-other unix operating systems.
-If <i>runit</i> runs for you on any other operating system or Linux
-distribution, please let me know.
+<b>OpenBSD</b>, <b>FreeBSD</b>, <b>MacOSX</b>, <b>Solaris</b>, and can
+easily be adapted to other unix operating systems.
+If <i>runit</i> runs for you on any other operating system, please let me
+know.
 <p>
 <b>Warning:</b> Replacing <i>sysvinit</i> or <i>init</i> can cause the
 system's boot to fail. Make sure you are able to recover and repair your
@@ -97,11 +97,9 @@ keep working. On *BSD systems use <b><tt>init 0</tt></b> for system halt
 and <b><tt>init 6</tt></b> for reboot.
 <a href="runlevels.html">Runlevels</a> are handled through the
 <a href="runsvdir.8.html">runsvdir</a> and
-<a href="runsvchdir.8.html">runsvchdir</a> programs. Service dependencies
-are rudimentarily handled through the <a href="svwaitup.8.html">svwaitup</a>
-and <a href="svwaitdown.8.html">svwaitdown</a> programs, see
-<a href="http://smarden.org/pape/djb/daemontools/noinit.html">
-Dependencies and runlevels</a> for an example.
+<a href="runsvchdir.8.html">runsvchdir</a> programs.
+Service <a href="dependencies.html">dependencies</a> are resolved
+automatically.
 <p>
 <i>runit</i> is optimized for reliability and small size. The amount of
 code in process no 1 should be minimal.
@@ -115,24 +113,24 @@ no 1, here is an example:
  # strings /proc/1/exe |grep Id
  &#36;Id: runit.c,v 1.7 2002/02/13 09:59:52 pape Exp &#36;
  # uptime
-  12:26:12 up 283 days, 22:47,  1 user,  load average: 0.00, 0.00, 0.00
+  11:59:13 up 365 days, 23:22,  3 users,  load average: 0.01, 0.02, 0.00
  # ps axuw |head -n20
  USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
  root         1  0.0  0.0    20   16 ?        S     2002   0:07 runit
  root         2  0.0  0.0     0    0 ?        SW    2002   0:00 [keventd]
- root         3  0.0  0.0     0    0 ?        SWN   2002   0:00 [ksoftirqd_CPU0]
- root         4  0.0  0.0     0    0 ?        SW    2002   3:30 [kswapd]
+ root         3  0.0  0.0     0    0 ?        SWN   2002   0:51 [ksoftirqd_CPU0]
+ root         4  0.0  0.0     0    0 ?        SW    2002 144:38 [kswapd]
  root         5  0.0  0.0     0    0 ?        SW    2002   0:08 [bdflush]
- root         6  0.0  0.0     0    0 ?        SW    2002   0:15 [kupdated]
- root       168  0.0  0.0  1652  168 ?        S     2002   0:00 /usr/sbin/cron
- root       174  0.0  0.0    36   24 ?        S     2002   0:00 runsvdir /var/service log: ....................................................................................................
+ root         6  0.0  0.0     0    0 ?        SW    2002   7:24 [kupdated]
+ root       168  0.0  0.0  1652  168 ?        S     2002   0:27 /usr/sbin/cron
+ root       174  0.0  0.0    36   24 ?        S     2002   1:06 runsvdir /var/service log: ...............................................................................................
  root       176  0.0  0.0    20   20 ?        S     2002   0:00 runsv qmail-send
  root       177  0.0  0.0    20   20 ?        S     2002   0:00 runsv getty-5
  root       178  0.0  0.0    20   20 ?        S     2002   0:00 runsv getty-4
  root       179  0.0  0.0    20   20 ?        S     2002   0:00 runsv getty-3
  root       180  0.0  0.0    20   20 ?        S     2002   0:00 runsv getty-2
  root       182  0.0  0.0    20   20 ?        S     2002   0:00 runsv socklog-unix
- root       183  0.0  0.0  1256    4 tty5     S     2002   0:00 getty 38400 tty5 linux
+ root       183  0.0  0.0  1256    4 tty5     S     2002   0:00 /sbin/getty 38400 tty5 linux
  root       184  0.0  0.0  1256    4 tty3     S     2002   0:00 getty 38400 tty3 linux
  root       185  0.0  0.0    20   20 ?        S     2002   0:00 runsv socklog-klog
  root       186  0.0  0.0    20   20 ?        S     2002   0:00 runsv ssh
@@ -148,18 +146,17 @@ no 1, here is an example:
        `-runsvdir-+-runsv-+-multilog
                   |       `-qmail-send-+-qmail-clean
                   |                    |-qmail-lspawn
-                  |                    `-qmail-rspawn
+                  |                    `-qmail-rspawn---qmail-remote
                   |-4*[runsv---getty]
                   |-2*[runsv-+-multilog]
                   |          `-socklog]
                   |-runsv-+-multilog
-                  |       `-sshd-+-sshd---bash---tail
-                  |              |-sshd---sshd---cvs
-                  |              `-sshd---sshd---bash---bash---pstree
+                  |       `-sshd-+-sshd---sshd---bash---bash---pstree
+                  |              `-sshd---sshd---rsync
                   |-runsv---clockspeed
                   |-runsv-+-dnscache
                   |       `-multilog
-                  |-runsv---apache-ssl-+-10*[apache-ssl]
+                  |-runsv---apache-ssl-+-9*[apache-ssl]
                   |                    |-gcache
                   |                    `-4*[multilog]
                   |-7*[runsv-+-multilog]
@@ -170,28 +167,11 @@ no 1, here is an example:
                   |-2*[runsv-+-multilog]
                   |          `-tcpsvd]
                   |-runsv-+-svlogd
-                  |       `-tcpsvd---smtpfront-qmail
+                  |       `-tcpsvd-+-smtpfront-qmail
+                  |                `-smtpfront-qmail---qmail-queue
                   `-runsv-+-svlogd
                           `-tcpsvd---bincimap-up---bincimapd
 </pre>
-This is from a more busy system:
-<pre>
- # strings /proc/1/exe |grep Id
- &#36;Id: runit.c,v 1.7 2002/02/13 09:59:52 pape Exp &#36;
- # uptime
-  13:21:22 up 114 days, 35 min,  3 users,  load average: 0.77, 0.56, 0.54
- # ps axuw |head
- USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
- root         1  0.0  0.0    20    4 ?        S    Feb11   0:04 runit
- root         2  0.0  0.0     0    0 ?        SW   Feb11   0:01 [keventd]
- root         3  0.0  0.0     0    0 ?        SW   Feb11   0:25 [kapmd]
- root         4  0.0  0.0     0    0 ?        SWN  Feb11   1:02 [ksoftirqd_CPU0]
- root         5  0.0  0.0     0    0 ?        SW   Feb11  11:57 [kswapd]
- root         6  0.0  0.0     0    0 ?        SW   Feb11   7:58 [bdflush]
- root         7  0.0  0.0     0    0 ?        SW   Feb11  13:49 [kupdated]
- root        57  0.0  0.0     0    0 ?        SW   Feb11   0:00 [msp3410 [auto]]
- root       191  0.0  0.0    36   24 ?        S    Feb11   2:42 runsvdir /var/service log: ....................................
-</pre>
 <hr>
 See <a href="install.html">How to install runit</a> for installing
 <i>runit</i> and <a href="replaceinit.html">How to replace init</a> for
diff --git a/doc/replaceinit.html b/doc/replaceinit.html
index 7def19c..87dd375 100644
--- a/doc/replaceinit.html
+++ b/doc/replaceinit.html
@@ -11,7 +11,8 @@
 <hr>
 <a href="#sysv">How to replace sysvinit on GNU/Linux</a><br>
 <a href="#bsd">How to replace init on *BSD</a><br>
-<a href="#macosx">How to replace init on MacOSX</a>
+<a href="#macosx">How to replace init on MacOSX</a><br>
+<a href="#solaris">How to replace init on Solaris</a>
 <hr>
 <a name="sysv"><h2>Replacing sysvinit (GNU/Linux)</h2></a>
 Follow these steps to migrate from <i>sysvinit</i> to <i>runit</i> on
@@ -48,12 +49,17 @@ The <i>runit</i> programs must reside on the root partition, copy them to
 At least one getty must run in stage 2 so you are able to login, choose a
 free <tt>tty</tt>, say <tt>tty5</tt>, where <i>sysvinit</i> is not running
 any getty (edit <tt>/etc/inittab</tt> and <tt>kill -HUP 1</tt> if
-needed) and tell <a href="http://cr.yp.to/daemontools/svscan.html">svscan</a>
-about the getty-5 <i>service</i>:
+needed) and tell <a href="runsvdir.8.html">runsvdir</a> about the getty-5
+<i>service</i>:
 <pre>
-  # ln -s /etc/runit/getty-5 /service/
+  # mkdir -p /var/service
+  # ln -s /etc/runit/getty-5 /var/service/
 </pre>
-Check if the getty is running.
+Start <i>runit</i>'s stage 2 for testing:
+<pre>
+  # /etc/runit/2 &
+</pre>
+And check if the getty is running.
 <h3>Step 4: Reboot into runit for testing</h3>
 Boot your system with <i>runit</i> for the first time. This does not change
 the default boot behavior of your system, <i>lilo</i> will be told to use
@@ -158,12 +164,17 @@ FreeBSD 4.4:
   # cp -p /package/admin/runit/etc/freebsd/getty-ttyv4/run /etc/runit/getty-5/
   # cp -p /package/admin/runit/etc/freebsd/getty-ttyv4/finish /etc/runit/getty-5/
 </pre>
-and tell
-<a href="http://cr.yp.to/daemontools/svscan.html">svscan</a>
-about the <tt>getty-5</tt> <i>service</i>:
+and tell <a href="runsvdir.8.html">runsvdir</a> about the <tt>getty-5</tt>
+<i>service</i>:
+<pre>
+  # mkdir -p /var/service
+  # ln -s /etc/runit/getty-5 /var/service/
+</pre>
+Start <i>runit</i>'s stage 2 for testing:
 <pre>
-  # ln -s /etc/runit/getty-5 /service/
+  # /etc/runit/2 &
 </pre>
+And check if the getty is running.
 <h3>Step 4: Replace the <tt>/sbin/init</tt> binary</h3>
 Before replacing the <tt>init</tt> binary, make sure that you are able
 to boot your system alternatively, e.g. with a boot floppy, to restore the
@@ -218,6 +229,12 @@ Replacing init on MacOSX is not yet supported.
 Please refer to the <a href="useinit.html">instructions</a> on how to use
 <i>runit</i> service supervision with the MacOSX init scheme.
 <hr>
+
+<a name="solaris"><h2>Replacing init on Solaris</h2></a>
+Replacing init on Solaris is not yet supported.
+Please refer to the <a href="useinit.html">instructions</a> on how to use
+<i>runit</i> service supervision with the Solaris sysvinit scheme.
+<hr>
 <address><a href="mailto:pape@smarden.org">
 Gerrit Pape &lt;pape@smarden.org&gt;
 </a></address>
diff --git a/doc/runlevels.html b/doc/runlevels.html
index c83d7de..66075ee 100644
--- a/doc/runlevels.html
+++ b/doc/runlevels.html
@@ -24,15 +24,17 @@ Create the following directories and symlinks:
  # ln -s /etc/runit/getty-5 /etc/runit/runsvdir/single/getty-5
  # ln -s default /etc/runit/runsvdir/current
 </pre>
-Copy the content of <tt>/service/</tt> to <tt>/etc/runit/runsvdir/current</tt>
-and replace <tt>/service</tt> with a symlink:
+Copy the content of <tt>/var/service/</tt> to
+<tt>/etc/runit/runsvdir/current</tt>
+and replace <tt>/var/service</tt> with a symlink:
 <pre>
- # cp -pR /service/* /etc/runit/runsvdir/current/
- # mv -f /service /service.old && ln -s /etc/runit/runsvdir/current /service
+ # cp -pR /var/service/* /etc/runit/runsvdir/current/
+ # mv -f /var/service /service.old && \
+     ln -s /etc/runit/runsvdir/current /var/service
 </pre>
 You have now created two runlevels: <tt>default</tt> and <tt>single</tt>.
 The <tt>current</tt> runlevel is <tt>default</tt>. It is safe to remove
-<tt>/service.old</tt> if you don't need it anymore.
+<tt>/var/service.old</tt> if you don't need it anymore.
 <p>
 Finally edit <tt>/etc/runit/2</tt> to set the <tt>default</tt> runlevel when
 stage 2 starts:
@@ -44,7 +46,7 @@ stage 2 starts:
  <b>runsvchdir default &gt;/dev/null</b>
  
  exec env - PATH=$PATH \
- runsvdir /service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+ runsvdir /var/service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
 </pre>
 <hr>
 <a name="switch"><h3>Switching runlevels</h3></a>
diff --git a/doc/useinit.html b/doc/useinit.html
index 0cc50ec..7d28cfd 100644
--- a/doc/useinit.html
+++ b/doc/useinit.html
@@ -20,9 +20,11 @@ Normally this is done by either adding an entry for
 adding <tt>/sbin/runsvdir-start</tt> to the system's <tt>StartupItems</tt>.
 <p>
 In any case, you first need to copy the <i>stage 2</i> script to
-<tt>/sbin/runsvdir-start</tt>:
+<tt>/sbin/runsvdir-start</tt>, and create the service directory
+<tt>/var/service</tt>:
 <pre>
   # install -m0750 /package/admin/runit/etc/2 /sbin/runsvdir-start
+  # mkdir -p /var/service
 </pre>
 <hr>
 <a href="#sysv">How to use with sysvinit</a><br>
@@ -37,7 +39,7 @@ file, do:
   SV:123456:respawn:/sbin/runsvdir-start
   EOT
 </pre>
-and tell <i>init</i> to reread its configuration, e.g.:
+and tell <i>init</i> to re-read its configuration, e.g.:
 <pre>
   # init q
 </pre>
diff --git a/etc/2 b/etc/2
index 666a643..233ad00 100755
--- a/etc/2
+++ b/etc/2
@@ -3,4 +3,4 @@
 PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
 
 exec env - PATH=$PATH \
-runsvdir /service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
+runsvdir /var/service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
diff --git a/etc/debian/3 b/etc/debian/3
index ee39593..6777be3 100755
--- a/etc/debian/3
+++ b/etc/debian/3
@@ -7,10 +7,10 @@ LAST=0
 test -r /etc/runit/reboot && LAST=6
 
 echo 'Waiting for getties to stop...'
-svwaitdown -xk -t14 /service/getty-*
+svwaitdown -xk -t14 /var/service/getty-*
 
 echo 'Waiting for services to stop...'
-svwaitdown -xk -t350 /service/*
+svwaitdown -xk -t350 /var/service/*
 
 echo 'Shutdown...'
 /etc/init.d/rc $LAST
diff --git a/etc/freebsd/3 b/etc/freebsd/3
index 8e1b40c..b04f4af 100755
--- a/etc/freebsd/3
+++ b/etc/freebsd/3
@@ -4,7 +4,7 @@ exec 2>&1
 PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin
 
 echo 'Waiting for services to stop...'
-svwaitdown -xk -t350 /service/*
+svwaitdown -xk -t350 /var/service/*
 
 echo 'Shutdown...'
 if test -x /etc/runit/reboot; then
diff --git a/etc/macosx/StartupItems/runit b/etc/macosx/StartupItems/runit
index 11510fb..99b0178 100755
--- a/etc/macosx/StartupItems/runit
+++ b/etc/macosx/StartupItems/runit
@@ -12,7 +12,7 @@ StartService() {
 }
 StopService() {
   ConsoleMessage "Stopping runit service supervision"
-  svwaitdown -k -t34 /service/*
+  svwaitdown -k -t34 /var/service/*
 }
 RestartService() {
   return 0
diff --git a/etc/openbsd/3 b/etc/openbsd/3
index d8c4f61..b868031 100755
--- a/etc/openbsd/3
+++ b/etc/openbsd/3
@@ -4,10 +4,10 @@ exec 2>&1
 PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin
 
 echo 'Waiting for getties to stop...'
-svwaitdown -xk -t14 /service/getty-*
+svwaitdown -xk -t14 /var/service/getty-*
 
 echo 'Waiting for services to stop...'
-svwaitdown -xk -t350 /service/*
+svwaitdown -xk -t350 /var/service/*
 
 echo 'Shutdown...'
 if test -x /etc/runit/reboot; then
diff --git a/man/runsv.8 b/man/runsv.8
index 1f4200c..96991fd 100644
--- a/man/runsv.8
+++ b/man/runsv.8
@@ -65,7 +65,7 @@ and (optionally)
 are provided to give commands to
 .BR runsv .
 You can use
-.BR svc (8)
+.BR runsvctrl (8)
 to control the service or just write one of the following characters to
 the named pipe:
 .TP
@@ -124,10 +124,10 @@ exits.
 This command is ignored if it is given to
 .IR service /log/supervise/control.
 .P
-For example, to send a TERM signal to /service/socklog-unix, either do
-  # svc \-t /service/socklog-unix
+Example: to send a TERM signal to the socklog-unix service, either do
+  # runsvctrl term /var/service/socklog-unix
  or
-  # echo \-n t >/service/socklog-unix/supervise/control
+  # echo \-n t >/var/service/socklog-unix/supervise/control
 .P
 If
 .BR echo (1)
@@ -162,10 +162,7 @@ runsvchdir(8),
 svlogd(8),
 svwaitdown(8),
 svwaitup(8),
-svc(8),
-supervise(8)
 .P
- http://smarden.org/runit/
- http://cr.yp.to/daemontools.html
+http://smarden.org/runit/
 .SH AUTHOR
 Gerrit Pape <pape@smarden.org>
diff --git a/man/runsvchdir.8 b/man/runsvchdir.8
index f7ef74a..30294c9 100644
--- a/man/runsvchdir.8
+++ b/man/runsvchdir.8
@@ -27,13 +27,13 @@ with a symlink pointing to
 .IR dir .
 .P
 Normally 
-.I /service
+.I /var/service
 is a symlink to
 .IR current ,
 and
 .BR runsvdir (8)
 is running
-.IR /service .
+.IR /var/service .
 .SH EXIT CODES
 .B runsvchdir
 prints an error message and exits 111 on error.
diff --git a/man/runsvdir.8 b/man/runsvdir.8
index f590e43..6d61e75 100644
--- a/man/runsvdir.8
+++ b/man/runsvdir.8
@@ -90,10 +90,7 @@ runit-init(8),
 svlogd(8),
 svwaitdown(8),
 svwaitup(8),
-readproctitle(8),
-svscan(8)
 .P
- http://smarden.org/runit/
- http://cr.yp.to/daemontools.html
+http://smarden.org/runit/
 .SH AUTHOR
 Gerrit Pape <pape@smarden.org>
diff --git a/package/CHANGES b/package/CHANGES
index 6a60fff..236825c 100644
--- a/package/CHANGES
+++ b/package/CHANGES
@@ -8,6 +8,12 @@
   * utmpset.c: support systems with utmp or utmpx (solaris).
   * Makefile: adapt.
   * supports the solaris platform (thx Uffe Jakobsen).
+  * doc/benefits.html, doc/index.html, doc/replaceinit.html,
+    doc/runlevels.html, doc/useinit.html: default service directory is
+    /var/service; minor.
+  * etc/2, etc/debian/3, etc/freebsd/3, etc/macosx/StartupItems/runit,
+    etc/openbsd/3, man/runsv.8, man/runsvchdir.8, man/runsvdir.8: default
+    service directory is /var/service.
 
 runit 0.11.2
 Tue, 23 Sep 2003 10:15:32 +0200