diff options
author | Gerrit Pape <pape@smarden.org> | 2003-06-17 13:48:35 +0000 |
---|---|---|
committer | Gerrit Pape <pape@smarden.org> | 2003-06-17 13:48:35 +0000 |
commit | 2208761ba51953b772d78bb99229abeb5cf2231b (patch) | |
tree | 9787eebc26da26fbe0da5bde0a0b657cc12429b4 | |
parent | ea4074e15836b82ae6e12f0d2c636ab5642f01f0 (diff) | |
download | runit-2208761ba51953b772d78bb99229abeb5cf2231b.tar.gz runit-2208761ba51953b772d78bb99229abeb5cf2231b.tar.xz runit-2208761ba51953b772d78bb99229abeb5cf2231b.zip |
* runit.c: user select() on systems that don't provide poll() (builds
on Mac OSX). * svlogd.c: reset match flag in lineflush() in all cases. * Makefile: build setuidgid in default target. * doc/useinit.html: add instruction to create /etc/runit/2 first. * doc/install.html: minor. 0.9.5.
-rw-r--r-- | Makefile | 7 | ||||
-rwxr-xr-x | debian/rules | 36 | ||||
-rw-r--r-- | doc/index.html | 3 | ||||
-rw-r--r-- | doc/install.html | 14 | ||||
-rw-r--r-- | doc/replaceinit.html | 4 | ||||
-rw-r--r-- | doc/upgrade.html | 2 | ||||
-rw-r--r-- | doc/useinit.html | 7 | ||||
-rwxr-xr-x | etc/2 (renamed from etc/debian/2) | 0 | ||||
-rwxr-xr-x | etc/freebsd/2 | 6 | ||||
-rwxr-xr-x | etc/openbsd/2 | 6 | ||||
-rw-r--r-- | package/CHANGES | 9 | ||||
-rwxr-xr-x | package/upgrade | 4 | ||||
-rw-r--r-- | src/Makefile | 2 | ||||
-rw-r--r-- | src/runit.c | 14 | ||||
-rw-r--r-- | src/svlogd.c | 1 |
15 files changed, 68 insertions, 47 deletions
diff --git a/Makefile b/Makefile index b0e677b..72e079c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ DESTDIR= -PACKAGE=runit-0.9.4 +PACKAGE=runit-0.9.5 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 @@ -16,7 +16,7 @@ all: clean .manpages $(PACKAGE).tar.gz > doc/$$i.html ; \ done ; \ echo 'fix up html manually...' - echo 'patch -p0 <manpagehtml.diff' + echo 'patch -p0 <manpagehtml.diff && exit' sh touch .manpages @@ -26,6 +26,9 @@ $(PACKAGE).tar.gz: make -C src clean cp -a $(DIRS) TEMP/admin/$(PACKAGE)/ ln -sf ../etc/debian TEMP/admin/$(PACKAGE)/doc/ + for i in TEMP/admin/$(PACKAGE)/etc/*; do \ + test -d $$i && ln -s ../2 $$i/2; \ + done chmod -R g-ws TEMP/admin chmod +t TEMP/admin find TEMP -exec touch {} \; diff --git a/debian/rules b/debian/rules index ecaefd3..ab6e72f 100755 --- a/debian/rules +++ b/debian/rules @@ -41,13 +41,13 @@ build-arch: configure-stamp build-arch-stamp build-arch-stamp: dh_testdir - tar xfzvp runit-0.9.4.tar.gz + tar xfzvp runit-0.9.5.tar.gz -gcc -v ( \ set -e; \ - cd admin/runit-0.9.4/src; \ - ln -s runit-0.9.4 runit; mv runit ../..; \ + cd admin/runit-0.9.5/src; \ + ln -s runit-0.9.5 runit; mv runit ../..; \ echo "$(CC) $(CFLAGS)" >conf-cc; \ echo "$(CC) $(LDFLAGS)" >conf-ld; \ $(MAKE); \ @@ -80,35 +80,35 @@ install: build dh_installdirs # runit - install -m0500 admin/runit-0.9.4/src/runit \ + install -m0500 admin/runit-0.9.5/src/runit \ $(CURDIR)/debian/runit/sbin/runit - install -m0500 admin/runit-0.9.4/src/runit-init \ + install -m0500 admin/runit-0.9.5/src/runit-init \ $(CURDIR)/debian/runit/sbin/runit-init - install -m0755 admin/runit-0.9.4/src/runsvdir \ + install -m0755 admin/runit-0.9.5/src/runsvdir \ $(CURDIR)/debian/runit/usr/bin/runsvdir - install -m0755 admin/runit-0.9.4/src/runsv \ + install -m0755 admin/runit-0.9.5/src/runsv \ $(CURDIR)/debian/runit/usr/bin/runsv - install -m0755 admin/runit-0.9.4/src/runsvchdir \ + install -m0755 admin/runit-0.9.5/src/runsvchdir \ $(CURDIR)/debian/runit/usr/sbin/runsvchdir - install -m0755 admin/runit-0.9.4/src/svlogd \ + install -m0755 admin/runit-0.9.5/src/svlogd \ $(CURDIR)/debian/runit/usr/bin/svlogd - install -m0755 admin/runit-0.9.4/src/svwaitdown \ + install -m0755 admin/runit-0.9.5/src/svwaitdown \ $(CURDIR)/debian/runit/usr/bin/svwaitdown - install -m0755 admin/runit-0.9.4/src/svwaitup \ + install -m0755 admin/runit-0.9.5/src/svwaitup \ $(CURDIR)/debian/runit/usr/bin/svwaitup - install -m0755 admin/runit-0.9.4/src/utmpset \ + install -m0755 admin/runit-0.9.5/src/utmpset \ $(CURDIR)/debian/runit/usr/sbin/utmpset - install -m0755 admin/runit-0.9.4/src/runsvstat \ + install -m0755 admin/runit-0.9.5/src/runsvstat \ $(CURDIR)/debian/runit/usr/bin/runsvstat - install -m0755 admin/runit-0.9.4/src/runsvctrl \ + install -m0755 admin/runit-0.9.5/src/runsvctrl \ $(CURDIR)/debian/runit/usr/bin/runsvctrl - install -m0755 admin/runit-0.9.4/src/setuidgid \ + install -m0755 admin/runit-0.9.5/src/setuidgid \ $(CURDIR)/debian/runit/usr/sbin/setuidgid - install -m0755 admin/runit-0.9.4/etc/debian/getty-tty5/run \ + install -m0755 admin/runit-0.9.5/etc/debian/getty-tty5/run \ $(CURDIR)/debian/runit/etc/runit/getty-5/run - install -m0755 admin/runit-0.9.4/etc/debian/getty-tty5/finish \ + install -m0755 admin/runit-0.9.5/etc/debian/getty-tty5/finish \ $(CURDIR)/debian/runit/etc/runit/getty-5/finish # lintian overrides @@ -147,7 +147,7 @@ binary-arch: build install # dh_installdocs -an # dh_installexamples -a dh_installman -a admin/runit/man/*.8 - dh_installchangelogs -a admin/runit-0.9.4/package/CHANGES + dh_installchangelogs -a admin/runit-0.9.5/package/CHANGES dh_strip -a # dh_link -a dh_compress -a diff --git a/doc/index.html b/doc/index.html index 80f03e9..2e9eb8f 100644 --- a/doc/index.html +++ b/doc/index.html @@ -41,7 +41,8 @@ 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>, and can easily be adapted to other unix +<b>OpenBSD</b>, <b>FreeBSD</b>, <b>Mac OSX</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. diff --git a/doc/install.html b/doc/install.html index eedc169..27ce591 100644 --- 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.4.tar.gz">runit-0.9.4.tar.gz</a> into <tt>/package</tt> +<a href="runit-0.9.5.tar.gz">runit-0.9.5.tar.gz</a> into <tt>/package</tt> and unpack the archive <pre> # cd /package - # 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 + # gunzip runit-0.9.5.tar + # tar -xpf runit-0.9.5.tar + # rm runit-0.9.5.tar + # cd admin/runit-0.9.5 </pre> Compile and install the <i>runit</i> programs <pre> @@ -35,6 +35,10 @@ hierarchy, do: <pre> # package/install-man </pre> +To report success: +<pre> + # mail pape-runit-0.9.5@smarden.org <compile/sysdeps +</pre> Refer to <a href="replaceinit.html">replacing init</a> for replacing <i>init</i> with <i>runit</i>, or to <a href="useinit.html">use with traditional init</a> for running diff --git a/doc/replaceinit.html b/doc/replaceinit.html index c8f8565..44bed23 100644 --- a/doc/replaceinit.html +++ b/doc/replaceinit.html @@ -107,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.4@smarden.org + # ( uname -a ; cat /etc/runit/[123] ) | mail pape-runit-0.9.5@smarden.org </pre> <hr> @@ -188,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.4@smarden.org + # ( uname -a ; cat /etc/runit/[123] ) | mail pape-runit-0.9.5@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/upgrade.html b/doc/upgrade.html index bc20888..18691d7 100644 --- 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.4</h3> +<h3>0.8.0 or 0.8.1 to 0.9.x</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/doc/useinit.html b/doc/useinit.html index 37c4123..1450608 100644 --- a/doc/useinit.html +++ b/doc/useinit.html @@ -17,6 +17,13 @@ current <i>init</i>. Normally this is done by either adding <tt>/etc/runit/2</tt> as command to </tt>/etc/rc.local</tt>, or by adding an entry for <tt>/etc/runit/2</tt> to <tt>/etc/inittab</tt>. +<p> +In either case, you first need to copy the <i>stage 2</i> script to +<tt>/etc/runit/2</tt>: +<pre> + # mkdir -p /etc/runit + # cp -p /package/admin/runit/etc/2 /etc/runit/ +</pre> <hr> If your system uses a sysvinit alike init scheme with a <tt>/etc/inittab</tt> file, do: diff --git a/etc/debian/2 b/etc/2 index 666a643..666a643 100755 --- a/etc/debian/2 +++ b/etc/2 diff --git a/etc/freebsd/2 b/etc/freebsd/2 deleted file mode 100755 index 666a643..0000000 --- a/etc/freebsd/2 +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin - -exec env - PATH=$PATH \ -runsvdir /service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................' diff --git a/etc/openbsd/2 b/etc/openbsd/2 deleted file mode 100755 index 666a643..0000000 --- a/etc/openbsd/2 +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin - -exec env - PATH=$PATH \ -runsvdir /service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................' diff --git a/package/CHANGES b/package/CHANGES index 0bc209f..951c769 100644 --- a/package/CHANGES +++ b/package/CHANGES @@ -1,3 +1,12 @@ +runit 0.9.5 +Tue, 17 Jun 2003 10:48:10 +0200 + * runit.c: user select() on systems that don't provide poll() (builds + on Mac OSX). + * svlogd.c: reset match flag in lineflush() in all cases. + * Makefile: build setuidgid in default target. + * doc/useinit.html: add instruction to create /etc/runit/2 first. + * doc/install.html: minor. + 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 diff --git a/package/upgrade b/package/upgrade index e310a25..745fdad 100755 --- 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.4...' +echo 'Creating symlink runit -> runit-0.9.5...' rm -f runit -ln -s runit-0.9.4 runit +ln -s runit-0.9.5 runit mv -f runit .. echo 'Making command links in /command...' diff --git a/src/Makefile b/src/Makefile index a027310..3a3788a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,5 +1,5 @@ IT=sysdeps runit runit-init runsv runsvctrl runsvstat runsvdir runsvchdir \ -svwaitup svwaitdown utmpset svlogd +svwaitup svwaitdown utmpset svlogd setuidgid default: $(IT) diff --git a/src/runit.c b/src/runit.c index 5637d75..225333a 100644 --- a/src/runit.c +++ b/src/runit.c @@ -1,5 +1,3 @@ -#include <poll.h> - #include <sys/types.h> #include <sys/reboot.h> #include <sys/ioctl.h> @@ -48,6 +46,9 @@ int main (int argc, const char * const *argv, char * const *envp) { int wstat; int st; iopause_fd x; +#ifndef IOPAUSE_POLL + fd_set rfds; +#endif char ch; int ttyfd; struct stat s; @@ -135,14 +136,21 @@ int main (int argc, const char * const *argv, char * const *envp) { x.fd =selfpipe[0]; x.events =IOPAUSE_READ; - +#ifndef IOPAUSE_POLL + FD_ZERO(&rfds); + FD_SET(x.fd, &rfds); +#endif for (;;) { int child; sig_unblock(sig_child); sig_unblock(sig_cont); sig_unblock(sig_int); +#ifdef IOPAUSE_POLL poll(&x, 1, -1); +#else + select(x.fd +1, &rfds, (fd_set*)0, (fd_set*)0, (struct timeval*)0); +#endif sig_block(sig_cont); sig_block(sig_child); sig_block(sig_int); diff --git a/src/svlogd.c b/src/svlogd.c index 37015ba..d77a938 100644 --- a/src/svlogd.c +++ b/src/svlogd.c @@ -456,6 +456,7 @@ unsigned int lineadd(struct logdir *ld, char *s, int len) { unsigned int lineflush(struct logdir *ld, char *s, int len) { switch(ld->match) { case '-': + ld->match =0; return(0); case 0: linestart(ld, s, len); |