commit f6a23459ff229635d40bf6abcae1223b08ca3418
parent ed942e19bdb37d43f569873b5e7a5f71e2231fa5
Author: Gerrit Pape <pape@smarden.org>
Date: Wed, 13 Feb 2002 09:59:52 +0000
runit.c: support ctrl-alt-del also on Linux/i386, dietlic.
runscripts.html: more samples. (thx Alessandro Bono)
Diffstat:
9 files changed, 76 insertions(+), 43 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,6 +1,6 @@
DESTDIR=
-PACKAGE=runit-0.3.1
+PACKAGE=runit-0.3.2
DIRS=doc man etc package src
MANPAGES=man/runit.8 man/runit-init.8 man/svwaitdown.8 man/svwaitup.8
DAEMONTOOLS_PD=daemontools-pd-0.76
diff --git a/debian/postinst b/debian/postinst
@@ -25,7 +25,7 @@ set -e
case "$1" in
configure)
( \
- cd /package/admin/runit-0.3.1
+ cd /package/admin/runit-0.3.2
package/upgrade
)
;;
diff --git a/debian/rules b/debian/rules
@@ -23,22 +23,22 @@ build-stamp:
# $(MAKE)
#/usr/bin/docbook-to-man debian/runit.sgml > runit.1
- tar xfzvp runit-0.3.1.tar.gz
- mkdir -p admin/runit-0.3.1/compile
+ tar xfzvp runit-0.3.2.tar.gz
+ mkdir -p admin/runit-0.3.2/compile
tar xfzvp daemontools-pd-0.76.tar.gz \
- -C admin/runit-0.3.1/compile
+ -C admin/runit-0.3.2/compile
( \
- cd admin/runit-0.3.1/compile ; \
+ cd admin/runit-0.3.2/compile ; \
ln -s daemontools-pd-0.76 support ; \
echo 'diet gcc -O2 -Wall' > support/conf-cc ; \
echo 'diet gcc -s -Os -pipe' > support/conf-ld ; \
)
( \
- cd admin/runit-0.3.1 ; \
+ cd admin/runit-0.3.2 ; \
package/compile ; \
- echo "/package/admin/runit-0.3.1" > compile/home ; \
+ echo "/package/admin/runit-0.3.2" > compile/home ; \
rm -f compile/src ; \
- ln -s /package/admin/runit-0.3.1/src compile/src ; \
+ ln -s /package/admin/runit-0.3.2/src compile/src ; \
)
touch build-stamp
@@ -65,40 +65,40 @@ install: build
chmod 1755 debian/runit/package
cp -a admin debian/runit/package/
- rm -rf debian/runit/package/admin/runit-0.3.1/compile
- cp -a debian/runit/package/admin/runit-0.3.1/man .
- rm -rf debian/runit/package/admin/runit-0.3.1/man
- cp -a debian/runit/package/admin/runit-0.3.1/doc .
- rm -rf debian/runit/package/admin/runit-0.3.1/doc
- cp -a debian/runit/package/admin/runit-0.3.1/etc .
- rm -rf debian/runit/package/admin/runit-0.3.1/etc
- cp -a debian/runit/package/admin/runit-0.3.1/package .
+ rm -rf debian/runit/package/admin/runit-0.3.2/compile
+ cp -a debian/runit/package/admin/runit-0.3.2/man .
+ rm -rf debian/runit/package/admin/runit-0.3.2/man
+ cp -a debian/runit/package/admin/runit-0.3.2/doc .
+ rm -rf debian/runit/package/admin/runit-0.3.2/doc
+ cp -a debian/runit/package/admin/runit-0.3.2/etc .
+ rm -rf debian/runit/package/admin/runit-0.3.2/etc
+ cp -a debian/runit/package/admin/runit-0.3.2/package .
# /etc/runit
- cp -p admin/runit-0.3.1/etc/debian/[123] \
+ cp -p admin/runit-0.3.2/etc/debian/[123] \
debian/runit/etc/runit/
- cp -p admin/runit-0.3.1/etc/debian/ctrlaltdel \
+ cp -p admin/runit-0.3.2/etc/debian/ctrlaltdel \
debian/runit/etc/runit/
- cp -p admin/runit-0.3.1/etc/debian/getty-tty5/run \
+ cp -p admin/runit-0.3.2/etc/debian/getty-tty5/run \
debian/runit/etc/runit/getty-tty5
# runit programs
- cp -p debian/runit/package/admin/runit-0.3.1/command/runit* \
+ cp -p debian/runit/package/admin/runit-0.3.2/command/runit* \
debian/runit/sbin/
# cleanup
- rm -rf debian/runit/package/admin/runit-0.3.1/compile
+ rm -rf debian/runit/package/admin/runit-0.3.2/compile
# create debian/links
rm -f debian/links
for i in \
- `cat debian/runit/package/admin/runit-0.3.1/package/commands` ; \
+ `cat debian/runit/package/admin/runit-0.3.2/package/commands` ; \
do \
echo "/package/admin/runit/command/$$i /command/$$i" \
>> debian/links ; \
done
# for i in \
-# `cat debian/runit/package/admin/runit-0.3.1/package/commands` ; \
+# `cat debian/runit/package/admin/runit-0.3.2/package/commands` ; \
# do \
# echo "/command/$$i /usr/local/bin/$$i" \
# >> debian/links ; \
diff --git a/doc/install.html b/doc/install.html
@@ -13,14 +13,14 @@ Check that you have the recent version of
<a href="http://cr.yp.to/daemontools.html">daemontools</a> installed.
<p>
Download
-<a href="runit-0.3.1.tar.gz">runit-0.3.1.tar.gz</a> into <tt>/package</tt>
+<a href="runit-0.3.2.tar.gz">runit-0.3.2.tar.gz</a> into <tt>/package</tt>
and unpack the archive
<pre>
# cd /package
- # gunzip runit-0.3.1.tar
- # tar -xpf runit-0.3.1.tar
- # rm runit-0.3.1.tar
- # cd admin/runit-0.3.1
+ # gunzip runit-0.3.2.tar
+ # tar -xpf runit-0.3.2.tar
+ # rm runit-0.3.2.tar
+ # cd admin/runit-0.3.2
</pre>
Compile and install the <i>runit</i> programs
<pre>
diff --git 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.3.1@smarden.org
+ # ( uname -a ; cat /etc/runit/[123] ) | mail pape-runit-0.3.2@smarden.org
</pre>
<hr>
@@ -187,7 +187,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.3.1@smarden.org
+ # ( uname -a ; cat /etc/runit/[123] ) | mail pape-runit-0.3.2@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/runscripts.html b/doc/runscripts.html
@@ -18,7 +18,9 @@
<a href="#dhclient">dhclient</a><br>
<a href="#gdm">gdm</a><br>
<a href="#statd">statd</a>, <a href="#mountd">mountd</a><br>
-<a href="#squid">squid</a>
+<a href="#squid">squid</a><br>
+<a href="#cups">cups</a><br>
+<a href="#pure-ftpd">pure-ftpd</a>
<hr>
This is a collection of <tt>run</tt> scripts for popular services to have
them monitored by the
@@ -26,9 +28,12 @@ them monitored by the
have additional run scripts or one of these run scripts works for you on
an operating system not stated here, please
<a href="mailto:pape@smarden.org">let me know</a>.
+<p>
+Thanks go to the following people for contributing run scripts:
+Alessandro Bono (a.bono).
<hr>
<h3><a name="getty">A <tt>mingetty</tt> run script</a></h3>
-<i>(Debian)</i>
+(<i>Debian</i>)
<pre>
#!/bin/sh
exec mingetty tty5
@@ -38,7 +43,7 @@ for getties. You should choose a getty that handles its own utmp and wtmp
records. Debian's <tt>mingetty</tt> does create his own utmp record.
<hr>
<h3><a name="sshd">A <tt>sshd</tt> run script</a></h3>
-<i>(Debian woody)</i>
+(<i>Debian woody</i>)
<pre>
#!/bin/sh
exec 2>&1
@@ -51,7 +56,7 @@ to be set up.
The <tt>sshd</tt> program is version <tt>OpenSSH_2.9p2</tt>.
<hr>
<h3><a name="klogd">A <tt>klogd</tt> run script</a></h3>
-<i>(Debian woody)</i>
+(<i>Debian woody</i>)
<pre>
#!/bin/sh
exec /sbin/klogd -n
@@ -65,7 +70,7 @@ The <tt>sshd</tt> program is version <tt>OpenSSH_2.9p2</tt>.
</pre>
<hr>
<h3><a name="dhcpd">A <tt>dhcpd</tt> run script</a></h3>
-<i>(Debian woody)</i>
+(<i>Debian woody</i>)
<pre>
#!/bin/sh
exec 2>&1
@@ -76,7 +81,7 @@ This service needs a
to be set up.
<hr>
<h3><a name="dhclient">A <tt>dhclient</tt> run script</a></h3>
-<i>(Debian woody)</i>
+(<i>Debian woody</i>)
<pre>
#!/bin/sh
exec dhclient -e -d -cf ./config -lf ./leases -pf ./pid eth1
@@ -90,7 +95,7 @@ to be set up.
</pre>
<hr>
<h3><a name="statd">A <tt>statd</tt> run script</a></h3>
-<i>(Debian woody)</i>
+(<i>Debian woody</i>)
<pre>
#!/bin/sh
exec 2>&1
@@ -109,7 +114,7 @@ This service needs a
<a href="http://cr.yp.to/daemontools/faq/create.html#runlog">log service</a>
to be set up.
<h3><a name="mountd">A <tt>mountd</tt> run script</a></h3>
-<i>(Debian woody)</i>
+(<i>Debian woody</i>)
<pre>
#!/bin/sh
svwaitup /service/statd
@@ -123,12 +128,30 @@ to be set up.
</pre>
<hr>
<h3><a name="squid">A <tt>squid</tt> run script</a></h3>
-<i>(Debian woody)</i>
+(<i>Debian woody</i>)
<pre>
#!/bin/sh
exec squid -f ./config -sN
</pre>
<hr>
+<h3><a name="cups">A <tt>cups</tt> run script</a></h3>
+(<i>Debian woody</i>, a.bono)
+<pre>
+ #!/bin/sh
+ exec 2>&1
+ exec /usr/sbin/cupsd -f
+</pre>
+<hr>
+<h3><a name="pure-ftpd">A <tt>pure-ftpd</tt> run script</a></h3>
+(<i>Debian woody</i>, a.bono)
+<pre>
+ #!/bin/sh
+ exec 2>&1
+ exec /usr/sbin/pure-ftpd -a 50 -E -l pam -u 100
+</pre>
+<hr>
+
+<hr>
<address><a href="mailto:pape@smarden.org">
Gerrit Pape <pape@smarden.org>
</a></address>
diff --git a/package/CHANGES b/package/CHANGES
@@ -1,3 +1,8 @@
+runit 0.3.2
+Wed, 13 Feb 2002 10:56:17 +0100
+ * runit.c: support ctrl-alt-del also on Linux/i386, dietlic.
+ * runscripts.html: more samples. (thx Alessandro Bono)
+
runit 0.3.1
Sun, 3 Feb 2002 16:30:55 +0100
* src: cleanup.
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.3.1...'
+echo 'Creating symlink runit -> runit-0.3.2...'
rm -f runit
-ln -s runit-0.3.1 runit
+ln -s runit-0.3.2 runit
mv -f runit ..
echo 'Making command links in /command...'
diff --git a/src/runit.c b/src/runit.c
@@ -96,10 +96,15 @@ int main (int argc, const char * const *argv, const char * const *envp) {
ndelay_on(selfpipe[1]);
#ifdef RB_DISABLE_CAD
- /* activate ctrlaltdel handling */
+ /* activate ctrlaltdel handling, glibc */
if (RB_DISABLE_CAD == 0)
reboot(0);
#endif
+#ifdef LINUX_REBOOT_CMD_CAD_OFF
+ /* activate ctrlaltdel handling, dietlibc */
+ if (LINUX_REBOOT_CMD_CAD_OFF == 0)
+ reboot(0);
+#endif
strerr_warn3(INFO, "$Id$",
": booting.", 0);