diff options
author | Gerrit Pape <pape@smarden.org> | 2003-02-25 12:51:38 +0000 |
---|---|---|
committer | Gerrit Pape <pape@smarden.org> | 2003-02-25 12:51:38 +0000 |
commit | 2ea2e0c40b29e3a129d540e4c29bffcac304e55a (patch) | |
tree | 581fe2a05eb926605b0131eecfc834fab9c3411d /etc | |
parent | 761593c09e514e4219bbc187d4fafbabb970592c (diff) | |
download | runit-2ea2e0c40b29e3a129d540e4c29bffcac304e55a.tar.gz runit-2ea2e0c40b29e3a129d540e4c29bffcac304e55a.tar.xz runit-2ea2e0c40b29e3a129d540e4c29bffcac304e55a.zip |
* doc/benefits.html: new.
* doc/index.html, doc/upgrade.html: adapt. * etc/*/1, etc/*/3, etc/*/ctrlaltdel: set permissions on the magic files instead of creating and removing them (can make them symbolic links now); set PATH. * runit.h: new; centralize runit's compiled in magic file names. * runit.c: check permissions of magic files instead of sole existence; conditionally call reboot(RB_AUTOBOOT), reboot(RB_POWER_OFF), reboot(RB_HALT_SYSTEM) if possible; code cleanup. * runit-init.c: set permissions on magic files instead of creating or removing them; code cleanup. * runsvdir.c: detect and tolerate system time warp; code cleanup. * runsv.c, runsvchdir.c, runsvctrl.c, runsvstat.c, svwaitdown.c, svwaitup.c, utmpset.c: code cleanup. 0.8.0.
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/debian/1 | 7 | ||||
-rwxr-xr-x | etc/debian/3 | 2 | ||||
-rwxr-xr-x | etc/debian/ctrlaltdel | 8 | ||||
-rwxr-xr-x | etc/freebsd/1 | 19 | ||||
-rwxr-xr-x | etc/freebsd/3 | 2 | ||||
-rwxr-xr-x | etc/freebsd/ctrlaltdel | 9 | ||||
-rwxr-xr-x | etc/openbsd/1 | 19 | ||||
-rwxr-xr-x | etc/openbsd/3 | 2 | ||||
-rwxr-xr-x | etc/openbsd/ctrlaltdel | 9 |
9 files changed, 47 insertions, 30 deletions
diff --git a/etc/debian/1 b/etc/debian/1 index 717289d..4cd10cb 100755 --- a/etc/debian/1 +++ b/etc/debian/1 @@ -1,7 +1,10 @@ #!/bin/sh # system one time tasks -/etc/init.d/rcS +PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin -rm -f /etc/runit/stopit +/etc/init.d/rcS /etc/init.d/rmnologin + +touch /etc/runit/stopit +chmod 0 /etc/runit/stopit diff --git a/etc/debian/3 b/etc/debian/3 index cf35a13..ee39593 100755 --- a/etc/debian/3 +++ b/etc/debian/3 @@ -1,7 +1,7 @@ #!/bin/sh exec 2>&1 -PATH=/sbin:/bin:/command +PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin LAST=0 test -r /etc/runit/reboot && LAST=6 diff --git a/etc/debian/ctrlaltdel b/etc/debian/ctrlaltdel index 2bfe4e0..6684457 100755 --- a/etc/debian/ctrlaltdel +++ b/etc/debian/ctrlaltdel @@ -1,7 +1,9 @@ #!/bin/sh + +PATH=/bin:/usr/bin MSG="System is going down in 14 seconds..." -#echo 'disabled.' ; exit -/bin/touch /etc/runit/stopit && \ - /bin/echo "$MSG" | /usr/bin/wall +# echo 'disabled.' ; exit +touch /etc/runit/stopit +chmod 100 /etc/runit/stopit && echo "$MSG" | wall /bin/sleep 14 diff --git a/etc/freebsd/1 b/etc/freebsd/1 index 121ff57..2a4492d 100755 --- a/etc/freebsd/1 +++ b/etc/freebsd/1 @@ -1,12 +1,17 @@ #!/bin/sh # system one time tasks + +PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin trap : 2 trap : 3 -/bin/sh /etc/rc autoboot && exit 0 - -# /etc/rc crashed, start emergency shell. -echo '/etc/rc failed. Press <enter> for emergency shell...' -read input -/bin/sh -p -/sbin/reboot +sh /etc/rc autoboot +if test $? -ne 0; then + # /etc/rc crashed, start emergency shell. + echo '/etc/rc failed. Press <enter> for emergency shell...' + read input + sh -p + exec reboot +fi +touch /etc/runit/stopit +chmod 0 /etc/runit/stopit diff --git a/etc/freebsd/3 b/etc/freebsd/3 index c301702..c1645a9 100755 --- a/etc/freebsd/3 +++ b/etc/freebsd/3 @@ -1,7 +1,7 @@ #!/bin/sh exec 2>&1 -PATH=/bin:/sbin:/command +PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin echo 'Waiting for services to stop...' svwaitdown -xk -t350 /service/* diff --git a/etc/freebsd/ctrlaltdel b/etc/freebsd/ctrlaltdel index aa62a01..6684457 100755 --- a/etc/freebsd/ctrlaltdel +++ b/etc/freebsd/ctrlaltdel @@ -1,8 +1,9 @@ #!/bin/sh -MSG="System is going down in 14 seconds..." -echo 'disabled.' ; exit +PATH=/bin:/usr/bin +MSG="System is going down in 14 seconds..." -/bin/touch /etc/runit/stopit && \ - /bin/echo "$MSG" | /usr/bin/wall +# echo 'disabled.' ; exit +touch /etc/runit/stopit +chmod 100 /etc/runit/stopit && echo "$MSG" | wall /bin/sleep 14 diff --git a/etc/openbsd/1 b/etc/openbsd/1 index f83a3f2..eaa3d39 100755 --- a/etc/openbsd/1 +++ b/etc/openbsd/1 @@ -1,12 +1,17 @@ #!/bin/sh # system one time tasks + +PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin trap : 2 trap : 3 -/bin/sh /etc/rc autoboot && exit 0 - -# /etc/rc crashed, start emergency shell. -echo '/etc/rc failed. Press <enter> for emergency shell...' -read input -/bin/sh -l -/sbin/reboot +sh /etc/rc autoboot +if test $? -ne 0; then + # /etc/rc crashed, start emergency shell. + echo '/etc/rc failed. Press <enter> for emergency shell...' + read input + sh -l + exec reboot +fi +touch /etc/runit/stopit +chmod 0 /etc/runit/stopit diff --git a/etc/openbsd/3 b/etc/openbsd/3 index 82da4d1..7174f2a 100755 --- a/etc/openbsd/3 +++ b/etc/openbsd/3 @@ -1,7 +1,7 @@ #!/bin/sh exec 2>&1 -PATH=/bin:/sbin:/command +PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin echo 'Waiting for getties to stop...' svwaitdown -xk -t14 /service/getty-* diff --git a/etc/openbsd/ctrlaltdel b/etc/openbsd/ctrlaltdel index aa62a01..6684457 100755 --- a/etc/openbsd/ctrlaltdel +++ b/etc/openbsd/ctrlaltdel @@ -1,8 +1,9 @@ #!/bin/sh -MSG="System is going down in 14 seconds..." -echo 'disabled.' ; exit +PATH=/bin:/usr/bin +MSG="System is going down in 14 seconds..." -/bin/touch /etc/runit/stopit && \ - /bin/echo "$MSG" | /usr/bin/wall +# echo 'disabled.' ; exit +touch /etc/runit/stopit +chmod 100 /etc/runit/stopit && echo "$MSG" | wall /bin/sleep 14 |