commit c121c0bacf07a05ef38284f0db994e83dc5e077c
parent ad3fa2174d02e6552b2b3307a8814a3cd4f4f42a
Author: Gerrit Pape <pape@smarden.org>
Date: Tue, 1 Jan 2002 10:25:50 +0000
code cleanup.
TARGETS fix.
install.html: typo.
etc/freebsd stage files, getty service added.
Diffstat:
10 files changed, 45 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,6 +1,6 @@
DESTDIR=
-PACKAGE=runit-0.2.6
+PACKAGE=runit-0.2.7
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/doc/install.html b/doc/install.html
@@ -32,8 +32,8 @@ gzip the man pages and copy them into a reasonable directory in your
# mkdir -p /usr/local/man/man8/
# gzip man/runit.8 && cp -f man/runit.8.gz /usr/local/man/man8/
# gzip man/runit-init.8 && cp -f man/runit-init.8.gz /usr/local/man/man8/
- # gzip man svwaitdown.8 && cp -f man/svwaitdown.8.gz /usr/local/man/man8/
- # gzip man svwaitup.8 && cp -f man/svwaitup.8.gz /usr/local/man/man8/
+ # gzip man/svwaitdown.8 && cp -f man/svwaitdown.8.gz /usr/local/man/man8/
+ # gzip man/svwaitup.8 && cp -f man/svwaitup.8.gz /usr/local/man/man8/
</pre>
Refer to <a href="replaceinit.html">replacing init</a> for
replacing <i>init</i> with <i>runit</i>.
diff --git a/etc/freebsd/1 b/etc/freebsd/1
@@ -0,0 +1,7 @@
+#!/bin/sh
+# system one time tasks
+rm -f /etc/runit/stopit
+
+/bin/sh /etc/rc autoboot
+
+exit 0
diff --git a/etc/freebsd/2 b/etc/freebsd/2
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /command/svscanboot
diff --git a/etc/freebsd/3 b/etc/freebsd/3
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+echo 'Stopping services...'
+/command/svc -d /service/*
+/command/svwaitdown -t350 /service/* || \
+ ( echo 'Killing services...' ; /command/svc -k /service/* )
+
+echo 'Stopping log services...'
+/command/svc -d /service/*/log
+/command/svwaitdown -t35 /service/*/log
+
+echo 'Shutdown...'
+if test -r /etc/runit/reboot; then
+ /sbin/reboot
+else
+ /sbin/halt
+fi
+
+exit 0
diff --git a/etc/freebsd/ctrlaltdel b/etc/freebsd/ctrlaltdel
@@ -0,0 +1,8 @@
+#!/bin/sh
+MSG="System is going down in 14 seconds..."
+
+echo 'disabled.' ; exit
+
+/bin/touch /etc/runit/stopit && \
+ /bin/echo "$MSG" | /usr/bin/wall
+/bin/sleep 14
diff --git a/etc/freebsd/getty-ttyv4/run b/etc/freebsd/getty-ttyv4/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/libexec/getty Pc ttyv4
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.2.6...'
+echo 'Creating symlink runit -> runit-0.2.7...'
rm -f runit
-ln -s runit-0.2.6 runit
+ln -s runit-0.2.7 runit
mv -f runit ..
echo 'Making command links in /command...'
diff --git a/src/TARGETS b/src/TARGETS
@@ -1,7 +1,7 @@
runit
runit.o
runit-init
-init.o
+runit-init.o
svwaitdown
svwaitdown.o
svwaitup
diff --git a/src/svwaitup.c b/src/svwaitup.c
@@ -13,7 +13,7 @@
#define USAGE " [ -v ] [ -s 2..600 ] service ..."
const char *progname;
-unsigned long sec;
+unsigned long sec =2;
unsigned int rc =0;
const char * const *dir;
@@ -29,7 +29,6 @@ void warn (const char *s1, const char *s2, struct strerr *e) {
int main (int argc, const char * const *argv) {
int opt;
- unsigned long sec =2;
int verbose =0;
char status[18];
int fd;