runit

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

commit 05294bd2f62b91c00331269946c9f503d6b85945
parent ee58ae48fb3566442a08aa95c6088960ed0ea6a3
Author: Gerrit Pape <pape@smarden.org>
Date:   Thu,  5 Jun 2003 11:39:11 +0000

  * svlogd.c: default log file size is 1M; print verbose message only if
    -v is set.
  * man/svlogd.8: document -v option; minor.
  * etc/freebsd/3, etc/openbsd/3: check if magic files in /etc/runit/ are
    executable, not readable.
  * etc/*/getty-tty*/run: remove utmpset from script.
  * etc/*/getty-tty*/finish: new: run utmpset.
  * doc/replaceinit.html: adapt.
  * setuidgid.c: new: daemontools' setuidgid drop in replacement (not
    installed by default).
  * Makefile: build setuidgid.
  * doc/index.html: update.

Diffstat:
MMakefile | 2+-
Mdebian/changelog | 12++++++++++++
Mdebian/control | 1+
Ddebian/diff/defaultsize.diff | 18------------------
Mdebian/rules | 43+++++++++++++++++++++----------------------
Mdoc/benefits.html | 2+-
Mdoc/index.html | 154++++++++++++++++++++++++++++++++++++++++++-------------------------------------
Mdoc/install.html | 10+++++-----
Mdoc/replaceinit.html | 13+++++++------
Mdoc/svlogd.8.html | 37++++++++++++++++++++-----------------
Mdoc/upgrade.html | 2+-
Metc/debian/getty-tty5/run | 1-
Metc/freebsd/3 | 2+-
Metc/freebsd/getty-ttyv4/run | 1-
Metc/openbsd/3 | 2+-
Metc/openbsd/getty-ttyC4/run | 1-
Mman/svlogd.8 | 10+++++++---
Mpackage/CHANGES | 15+++++++++++++++
Mpackage/upgrade | 4++--
Msrc/Makefile | 6++++++
Msrc/TARGETS | 2++
Msrc/svlogd.c | 10+++++-----
22 files changed, 190 insertions(+), 158 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,6 +1,6 @@ DESTDIR= -PACKAGE=runit-0.9.3 +PACKAGE=runit-0.9.4 DIRS=doc man etc package src MANPAGES=runit.8 runit-init.8 runsvdir.8 runsv.8 svwaitdown.8 svwaitup.8 \ utmpset.8 runsvchdir.8 runsvstat.8 runsvctrl.8 svlogd.8 diff --git a/debian/changelog b/debian/changelog @@ -1,3 +1,15 @@ +runit (0.9.4-0) unstable; urgency=low + + * new upstream version. + * debian/diff/defaultsize.diff: remove; applied upstream. + * debian/getty.run, debian/getty.finish: remove; obsolete. + * debian/rules: remove temporary patch; install upstream example + getty service directory; build and install setuidgid. + * debian/control: Replaces: daemontools (drop-in replacement + setuidgid plus manpage). + + -- Gerrit Pape <pape@smarden.org> Wed, 4 Jun 2003 14:26:58 +0200 + runit (0.9.3-2) unstable; urgency=low * debian/README.Debian: more detailed instructions on how to use diff --git a/debian/control b/debian/control @@ -8,6 +8,7 @@ Standards-Version: 3.5.9 Package: runit Architecture: any Suggests: runit-run +Replaces: dameontools Description: a UNIX init scheme with service supervision runit is a daemontools alike replacement for SysV-init and other init schemes. runit currently runs on Debian GNU/Linux, OpenBSD, FreeBSD, diff --git a/debian/diff/defaultsize.diff b/debian/diff/defaultsize.diff @@ -1,18 +0,0 @@ -* fix default max. size for single log files to match the documentation. - -Index: src/svlogd.c -=================================================================== -RCS file: /var/lib/cvs/runit/src/svlogd.c,v -retrieving revision 1.5 -diff -u -r1.5 svlogd.c ---- src/svlogd.c 3 May 2003 15:57:56 -0000 1.5 -+++ src/svlogd.c 15 May 2003 09:21:00 -0000 -@@ -305,7 +305,7 @@ - coe(ld->fdlock); - - ld->size =0; -- ld->sizemax =9000; -+ ld->sizemax =1000000; - ld->nmax =10; - ld->name =(char*)fn; - ld->match =0; diff --git a/debian/rules b/debian/rules @@ -15,20 +15,17 @@ build-arch: configure-stamp build-arch-stamp build-arch-stamp: dh_testdir - tar xfzvp runit-0.9.3.tar.gz + tar xfzvp runit-0.9.4.tar.gz -gcc -v - # temporary patch - ( set -e; cd admin/runit-0.9.3; patch -p0 ) \ - <debian/diff/defaultsize.diff - ( \ set -e; \ - cd admin/runit-0.9.3/src; \ - ln -s runit-0.9.3 runit; mv runit ../..; \ + cd admin/runit-0.9.4/src; \ + ln -s runit-0.9.4 runit; mv runit ../..; \ echo 'diet -v -Os gcc -O2 -Wall' >conf-cc; \ echo 'diet -v -Os gcc -s -Os -pipe' >conf-ld; \ $(MAKE); \ + $(MAKE) setuidgid; \ ) touch build-arch-stamp @@ -57,33 +54,35 @@ install: build dh_installdirs # runit - install -m0500 admin/runit-0.9.3/src/runit \ + install -m0500 admin/runit-0.9.4/src/runit \ $(CURDIR)/debian/runit/sbin/runit - install -m0500 admin/runit-0.9.3/src/runit-init \ + install -m0500 admin/runit-0.9.4/src/runit-init \ $(CURDIR)/debian/runit/sbin/runit-init - install -m0755 admin/runit-0.9.3/src/runsvdir \ + install -m0755 admin/runit-0.9.4/src/runsvdir \ $(CURDIR)/debian/runit/usr/bin/runsvdir - install -m0755 admin/runit-0.9.3/src/runsv \ + install -m0755 admin/runit-0.9.4/src/runsv \ $(CURDIR)/debian/runit/usr/bin/runsv - install -m0755 admin/runit-0.9.3/src/runsvchdir \ + install -m0755 admin/runit-0.9.4/src/runsvchdir \ $(CURDIR)/debian/runit/usr/sbin/runsvchdir - install -m0755 admin/runit-0.9.3/src/svlogd \ + install -m0755 admin/runit-0.9.4/src/svlogd \ $(CURDIR)/debian/runit/usr/bin/svlogd - install -m0755 admin/runit-0.9.3/src/svwaitdown \ + install -m0755 admin/runit-0.9.4/src/svwaitdown \ $(CURDIR)/debian/runit/usr/bin/svwaitdown - install -m0755 admin/runit-0.9.3/src/svwaitup \ + install -m0755 admin/runit-0.9.4/src/svwaitup \ $(CURDIR)/debian/runit/usr/bin/svwaitup - install -m0755 admin/runit-0.9.3/src/utmpset \ + install -m0755 admin/runit-0.9.4/src/utmpset \ $(CURDIR)/debian/runit/usr/sbin/utmpset - install -m0755 admin/runit-0.9.3/src/runsvstat \ + install -m0755 admin/runit-0.9.4/src/runsvstat \ $(CURDIR)/debian/runit/usr/bin/runsvstat - install -m0755 admin/runit-0.9.3/src/runsvctrl \ + install -m0755 admin/runit-0.9.4/src/runsvctrl \ $(CURDIR)/debian/runit/usr/bin/runsvctrl + install -m0755 admin/runit-0.9.4/src/setuidgid \ + $(CURDIR)/debian/runit/usr/sbin/setuidgid - install -m0755 debian/getty-tty5.run \ + install -m0755 etc/debian/getty-tty5/run \ $(CURDIR)/debian/runit/etc/runit/getty-5/run - install -m0755 debian/getty-tty5.finish \ + install -m0755 etc/debian/getty-tty5/finish \ $(CURDIR)/debian/runit/etc/runit/getty-5/finish # lintian overrides @@ -121,8 +120,8 @@ binary-arch: build install # dh_installdebconf -a # dh_installdocs -an # dh_installexamples -a - dh_installman -a admin/runit/man/*.8 - dh_installchangelogs -a admin/runit-0.9.3/package/CHANGES + dh_installman -a admin/runit/man/*.8 debian/*.8 + dh_installchangelogs -a admin/runit-0.9.4/package/CHANGES dh_strip -a # dh_link -a dh_compress -a diff --git a/doc/benefits.html b/doc/benefits.html @@ -110,7 +110,7 @@ A good choice for a log daemon is <i>runit</i>'s service logging daemon <i>daemontools</i> package. <p> The service daemon and the log daemon can run with different process states, -and under different user ids. +and under different user id's. <i>runit</i> supports easy and reliable logging for service daemons running chroot'ed. <p> diff --git a/doc/index.html b/doc/index.html @@ -111,79 +111,85 @@ and potato, and did not encounter any problems. Of course also the <tt>smarden.org</tt> content server is running with <i>runit</i> as process no 1, here is an example: <pre> - # strings /proc/1/exe |grep Id - &#36;Id: runit.c,v 1.7 2002/02/13 09:59:52 pape Exp &#36; - # uptime - 08:53:39 up 178 days, 19:11, 1 user, load average: 0.24, 0.12, 0.04 - # 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:06 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 1:29 [kswapd] - root 5 0.0 0.0 0 0 ? SW 2002 0:02 [bdflush] - root 6 0.0 0.0 0 0 ? SW 2002 0:10 [kupdated] - root 168 0.0 0.0 1652 216 ? S 2002 0:00 /usr/sbin/cron - root 174 0.0 0.0 36 24 ? S 2002 0:00 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 40 tty5 S 2002 0:00 getty 38400 tty5 linux - root 184 0.0 0.0 1256 40 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 - root 187 0.0 0.0 1256 40 tty4 S 2002 0:00 getty 38400 tty4 linux - # pstree - runit-+-bdflush - |-cron - |-keventd - |-ksoftirqd_CPU0 - |-kswapd - |-kupdated - `-runsvdir-+-runsv-+-multilog - | `-qmail-send-+-qmail-clean - | |-qmail-lspawn - | `-qmail-rspawn - |-4*[runsv---getty] - |-2*[runsv-+-multilog] - | `-socklog] - |-runsv-+-multilog - | `-sshd-+-sshd---sshd - | `-sshd---sshd---bash---bash---pstree - |-runsv---clockspeed - |-runsv-+-dnscache - | `-multilog - |-runsv---apache-ssl-+-12*[apache-ssl] - | |-gcache - | `-4*[multilog] - |-6*[runsv-+-multilog] - | `-tcpserver] - |-3*[runsv-+-multilog] - | `-tinydns] - |-runsv---uncat - `-2*[runsv-+-multilog] - `-tcpsvd] + # strings /proc/1/exe |grep Id + &#36;Id: runit.c,v 1.7 2002/02/13 09:59:52 pape Exp &#36; + # uptime + 13:16:19 up 219 days, 23:35, 1 user, load average: 0.00, 0.00, 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 2:47 [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:13 [kupdated] + root 168 0.0 0.0 1652 208 ? S 2002 0:00 /usr/sbin/cron + root 174 0.0 0.0 36 24 ? S 2002 0:00 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 28 tty5 S 2002 0:00 getty 38400 tty5 linux + root 184 0.0 0.0 1256 28 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 + root 187 0.0 0.0 1256 28 tty4 S 2002 0:00 getty 38400 tty4 linux + # pstree + runit-+-bdflush + |-cron + |-gcache + |-keventd + |-ksoftirqd_CPU0 + |-kswapd + |-kupdated + `-runsvdir-+-runsv-+-multilog + | `-qmail-send-+-qmail-clean + | |-qmail-lspawn + | `-qmail-rspawn + |-4*[runsv---getty] + |-2*[runsv-+-multilog] + | `-socklog] + |-runsv-+-multilog + | `-sshd-+-sshd---sshd---bash + | `-sshd---sshd---bash---bash---pstree + |-runsv---clockspeed + |-runsv-+-dnscache + | `-multilog + |-runsv---apache-ssl-+-9*[apache-ssl] + | |-gcache + | `-4*[multilog] + |-5*[runsv-+-multilog] + | `-tcpserver] + |-3*[runsv-+-multilog] + | `-tinydns] + |-runsv---uncat + |-2*[runsv-+-multilog] + | `-tcpsvd] + |-runsv-+-multilog + | `-tcpserver---smtpfront-qmail + |-runsv + `-runsv-+-svlogd + `-tcpsvd---smtpfront-qmail </pre> This is from a more busy system: <pre> - # strings /proc/1/exe |grep Id - &#36;Id: runit.c,v 1.6 2002/01/29 18:56:36 pape Exp &#36; - # uptime - 15:04:34 up 201 days, 15:34, 3 users, load average: 0.08, 0.03, 0.01 - # ps axuw |head - USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND - root 1 0.0 0.0 24 0 ? SW Feb07 0:05 runit - root 2 0.0 0.0 0 0 ? SW Feb07 0:01 [keventd] - root 3 0.0 0.0 0 0 ? SW Feb07 1:45 [kapm-idled] - root 4 0.0 0.0 0 0 ? SWN Feb07 1:21 [ksoftirqd_CPU0] - root 5 0.0 0.0 0 0 ? SW Feb07 31:40 [kswapd] - root 6 0.0 0.0 0 0 ? SW Feb07 0:06 [bdflush] - root 7 0.0 0.0 0 0 ? SW Feb07 14:26 [kupdated] - root 53 0.0 0.0 0 0 ? SW Feb07 0:00 [msp3410 [auto]] - daemon 115 0.0 0.0 1412 0 ? SW Feb07 0:00 /sbin/portmap + # 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 @@ -206,8 +212,12 @@ for recent informations. <hr> Related links: <ul> - <li><a href="http://www.fefe.de/minit/">minit</a> - <li><a href="http://multivac.cwru.edu/svscan-1/">svscan as process 1</a> + <li><a href="http://packages.debian.org/runit"> + runit Debian package</a> + <li><a href="http://www.fefe.de/minit/"> + minit</a> + <li><a href="http://multivac.cwru.edu/svscan-1/"> + svscan as process 1</a> <li><a href="ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/"> sysvinit</a> <li><a href="http://www.openbsd.org/cgi-bin/cvsweb/src/sbin/init/"> diff --git a/doc/install.html b/doc/install.html @@ -17,14 +17,14 @@ If you don't have a <tt>/package</tt> directory, create it now: # chmod 1755 /package </pre> Download -<a href="runit-0.9.3.tar.gz">runit-0.9.3.tar.gz</a> into <tt>/package</tt> +<a href="runit-0.9.4.tar.gz">runit-0.9.4.tar.gz</a> into <tt>/package</tt> and unpack the archive <pre> # cd /package - # gunzip runit-0.9.3.tar - # tar -xpf runit-0.9.3.tar - # rm runit-0.9.3.tar - # cd admin/runit-0.9.3 + # gunzip runit-0.9.4.tar + # tar -xpf runit-0.9.4.tar + # rm runit-0.9.4.tar + # cd admin/runit-0.9.4 </pre> Compile and install the <i>runit</i> programs <pre> diff --git a/doc/replaceinit.html b/doc/replaceinit.html @@ -31,6 +31,7 @@ Create also a getty service directory: <pre> # mkdir -p /etc/runit/getty-5 # cp -p /package/admin/runit/etc/debian/getty-tty5/run /etc/runit/getty-5/ + # cp -p /package/admin/runit/etc/debian/getty-tty5/finish /etc/runit/getty-5/ </pre> If you want <i>runit</i> to handle the ctrl-alt-del keyboard request, do: <pre> @@ -106,7 +107,7 @@ default Unix process no 1 <i>runit</i>. </pre> To report success: <pre> - # ( uname -a ; cat /etc/runit/[123] ) | mail pape-runit-0.9.3@smarden.org + # ( uname -a ; cat /etc/runit/[123] ) | mail pape-runit-0.9.4@smarden.org </pre> <hr> @@ -149,12 +150,12 @@ run on the virtual console no 5, create the getty-5 service directory: # mkdir -p /etc/runit/getty-5 OpenBSD 2.9: - # cp -p /package/admin/runit/etc/openbsd/getty-ttyC4/run \ - /etc/runit/getty-5/ + # cp -p /package/admin/runit/etc/openbsd/getty-ttyC4/run /etc/runit/getty-5/ + # cp -p /package/admin/runit/etc/openbsd/getty-ttyC4/finish /etc/runit/getty-5/ 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/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> @@ -187,7 +188,7 @@ Use <b>init 6</b> to reboot and <b>init 0</b> to halt a system that runs <p> To report success: <pre> - # ( uname -a ; cat /etc/runit/[123] ) | mail pape-runit-0.9.3@smarden.org + # ( uname -a ; cat /etc/runit/[123] ) | mail pape-runit-0.9.4@smarden.org </pre> <h3>Step 5: Service migration</h3> The goal is to migrate all services from <i>/etc/rc.*</i> scheme to the diff --git a/doc/svlogd.8.html b/doc/svlogd.8.html @@ -12,7 +12,7 @@ svlogd - runit's service logging daemon <H2><A NAME="sect1">Synopsis</A></H2> <B>svlogd</B> [-tv] [-r <I>c]</I> [-R -<I>abc]</I> [-l <I>n]</I> [-b <I>n]</I> <I>logs</I> +<I>xyz]</I> [-l <I>n]</I> [-b <I>n]</I> <I>logs</I> <H2><A NAME="sect2">Description</A></H2> <I>logs</I> consists of one or more arguments, each specifying a directory. <P> @@ -131,9 +131,9 @@ standard error. </DD> characters in log messages with <I>c</I>. Characters are replaced before pattern matching is applied. </DD> -<DT><B>-R <I>abc</B> </I></DT> +<DT><B>-R <I>xyz</B> </I></DT> <DD>replace charset. Additionally to non-printable -characters, replace all characters found in <I>abc</I> with <I>c</I> (default ``_''). </DD> +characters, replace all characters found in <I>xyz</I> with <I>c</I> (default ``_''). </DD> <DT><B>-l <I>len</B> </I></DT> @@ -144,26 +144,29 @@ message only. Default is 1000. </DD> <DD>buffer size. Set the size of the buffer <B>svlogd</B> uses when reading from standard input and writing to <I>logs</I> to <I>buflen</I>. Default is 1024. <I>buflen</I> must be greater than <I>len</I>. </DD> + +<DT><B>-v</B> </DT> +<DD>verbose. Print verbose +messages to standard error. </DD> </DL> <H2><A NAME="sect9">Signals</A></H2> -If <B>svlogd</B> is sent -a HUP signal, it closes and reopens all <I>logs</I>, and updates their configuration -according to <I>log/config</I>. <P> -If <B>svlogd</B> is sent a TERM signal, or if it sees -end-of-file on standard input, it stops reading standard input, processes -the data in the buffer, waits for all <I>processor</I> subprocesses to finish -if any, and exits 0 as soon as possible. <P> -If <B>svlogd</B> is sent an ALRM signal, -it forces log file rotation for all <I>logs</I> with a non empty <I>current</I> log file. - +If <B>svlogd</B> is sent a HUP signal, it closes +and reopens all <I>logs</I>, and updates their configuration according to <I>log/config</I>. +<P> +If <B>svlogd</B> is sent a TERM signal, or if it sees end-of-file on standard input, +it stops reading standard input, processes the data in the buffer, waits +for all <I>processor</I> subprocesses to finish if any, and exits 0 as soon as +possible. <P> +If <B>svlogd</B> is sent an ALRM signal, it forces log file rotation +for all <I>logs</I> with a non empty <I>current</I> log file. <H2><A NAME="sect10">See Also</A></H2> -<I>runsv(8)</I>, <I>runsvstat(8)</I>, <I>runsvctrl(8)</I>, <I>runsvdir(8)</I>, <I>runsvchdir(8)</I>, -<I>runit(8)</I>, <I>runit-init(8)</I>, <I>multilog(8)</I> <P> +<I>runsv(8)</I>, <I>runsvstat(8)</I>, +<I>runsvctrl(8)</I>, <I>runsvdir(8)</I>, <I>runsvchdir(8)</I>, <I>runit(8)</I>, <I>runit-init(8)</I>, <I>multilog(8)</I> +<P> <I>http://smarden.org/runit/</I> <H2><A NAME="sect11">Author</A></H2> -Gerrit -Pape &lt;pape@smarden.org&gt; <P> +Gerrit Pape &lt;pape@smarden.org&gt; <P> <HR><P> <A NAME="toc"><B>Table of Contents</B></A><P> diff --git a/doc/upgrade.html b/doc/upgrade.html @@ -10,7 +10,7 @@ <h1>runit - upgrading from previous versions</h1> <hr> -<h3>0.8.0 or 0.8.1 to 0.9.1 or 0.9.3</h3> +<h3>0.8.0 or 0.8.1 to 0.9.1 or 0.9.4</h3> The <a href="svlogd.8.html">svlogd</a> program is new. <i>svlogd</i> is a service logging daemon designed to be run from <tt>log/run</tt> files, similar to diff --git a/etc/debian/getty-tty5/run b/etc/debian/getty-tty5/run @@ -1,3 +1,2 @@ #!/bin/sh -/command/utmpset -w tty5 exec /sbin/getty 38400 tty5 linux diff --git a/etc/freebsd/3 b/etc/freebsd/3 @@ -7,7 +7,7 @@ echo 'Waiting for services to stop...' svwaitdown -xk -t350 /service/* echo 'Shutdown...' -if test -r /etc/runit/reboot; then +if test -x /etc/runit/reboot; then exec reboot else exec halt diff --git a/etc/freebsd/getty-ttyv4/run b/etc/freebsd/getty-ttyv4/run @@ -1,3 +1,2 @@ #!/bin/sh -/command/utmpset -w ttyv4 exec /usr/libexec/getty Pc ttyv4 diff --git a/etc/openbsd/3 b/etc/openbsd/3 @@ -10,7 +10,7 @@ echo 'Waiting for services to stop...' svwaitdown -xk -t350 /service/* echo 'Shutdown...' -if test -r /etc/runit/reboot; then +if test -x /etc/runit/reboot; then exec reboot else exec halt diff --git a/etc/openbsd/getty-ttyC4/run b/etc/openbsd/getty-ttyC4/run @@ -1,3 +1,2 @@ #!/bin/sh -/command/utmpset -w ttyC4 exec /usr/libexec/getty Pc ttyC4 diff --git a/man/svlogd.8 b/man/svlogd.8 @@ -5,7 +5,7 @@ svlogd \- runit's service logging daemon .B svlogd [\-tv] [\-r .I c\fR] [\-R -.I abc\fR] [\-l +.I xyz\fR] [\-l .I n\fR] [\-b .I n\fR] .I logs @@ -260,10 +260,10 @@ Replace non-printable characters in log messages with .IR c . Characters are replaced before pattern matching is applied. .TP -.B \-R \fIabc +.B \-R \fIxyz replace charset. Additionally to non-printable characters, replace all characters found in -.I abc +.I xyz with .I c (default ``_''). @@ -287,6 +287,10 @@ Default is 1024. .I buflen must be greater than .IR len . +.TP +.B \-v +verbose. +Print verbose messages to standard error. .SH SIGNALS If .B svlogd diff --git a/package/CHANGES b/package/CHANGES @@ -1,3 +1,18 @@ +runit 0.9.4 +Wed, 04 Jun 2003 13:56:33 +0200 + * svlogd.c: default log file size is 1M; print verbose message only if + -v is set. + * man/svlogd.8: document -v option; minor. + * etc/freebsd/3, etc/openbsd/3: check if magic files in /etc/runit/ are + executable, not readable. + * etc/*/getty-tty*/run: remove utmpset from script. + * etc/*/getty-tty*/finish: new: run utmpset. + * doc/replaceinit.html: adapt. + * setuidgid.c: new: daemontools' setuidgid drop in replacement (not + installed by default). + * Makefile: build setuidgid. + * doc/index.html: update. + runit 0.9.3 Sun, 04 May 2003 11:30:58 +0200 * Makefile: actually build runsvstat, runsvctrl before installing them, diff --git a/package/upgrade b/package/upgrade @@ -7,9 +7,9 @@ test -d src || ( echo 'Wrong working directory.'; exit 1 ) here=`env - PATH=$PATH pwd` parent=`dirname $here` -echo 'Creating symlink runit -> runit-0.9.3...' +echo 'Creating symlink runit -> runit-0.9.4...' rm -f runit -ln -s runit-0.9.3 runit +ln -s runit-0.9.4 runit mv -f runit .. echo 'Making command links in /command...' diff --git a/src/Makefile b/src/Makefile @@ -36,6 +36,9 @@ runsvchdir: load runsvchdir.o unix.a byte.a svlogd: load svlogd.o pmatch.o fmt_ptime.o unix.a byte.a time.a ./load svlogd pmatch.o fmt_ptime.o unix.a byte.a time.a +setuidgid: load setuidgid.o unix.a byte.a + ./load setuidgid unix.a byte.a + runit.o: compile sysdeps runit.c ./compile runit.c @@ -69,6 +72,9 @@ runsvchdir.o: compile runsvchdir.c svlogd.o: compile sysdeps svlogd.c ./compile svlogd.c +setuidgid.o: compile setuidgid.c + ./compile setuidgid.c + pmatch.o: compile pmatch.c ./compile pmatch.c diff --git a/src/TARGETS b/src/TARGETS @@ -20,6 +20,8 @@ runsvchdir runsvchdir.o svlogd svlogd.o +setuidgid +setuidgid.o pmatch.o fmt_ptime.o alloc.o diff --git a/src/svlogd.c b/src/svlogd.c @@ -305,7 +305,7 @@ unsigned int logdir_open(struct logdir *ld, const char *fn) { coe(ld->fdlock); ld->size =0; - ld->sizemax =9000; + ld->sizemax =1000000; ld->nmax =10; ld->name =(char*)fn; ld->match =0; @@ -486,7 +486,7 @@ int buffer_pread(int fd, char *s, unsigned int len) { } void sig_term_handler(void) { exitasap =1; - strerr_warn2(INFO, "sigterm received.", 0); + if (verbose) strerr_warn2(INFO, "sigterm received.", 0); } void sig_child_handler(void) { int pid, l; @@ -498,7 +498,7 @@ void sig_child_handler(void) { processorstop(&dir[l]); break; } - strerr_warn2(INFO, "sigchild received.", 0); + if (verbose) strerr_warn2(INFO, "sigchild received.", 0); } void sig_alarm_handler(void) { int l; @@ -507,11 +507,11 @@ void sig_alarm_handler(void) { if (dir[l].fddir != -1) if (dir[l].size > 0) rotate(&dir[l]); - strerr_warn2(INFO, "sigalarm received.", 0); + if (verbose) strerr_warn2(INFO, "sigalarm received.", 0); } void sig_hangup_handler(void) { logdirs_reopen(); - strerr_warn2(INFO, "sighangup received.", 0); + if (verbose) strerr_warn2(INFO, "sighangup received.", 0); } int main(int argc, const char **argv) {