summary refs log tree commit diff
path: root/etc/openbsd
diff options
context:
space:
mode:
authorGerrit Pape <pape@smarden.org>2002-09-26 11:19:08 +0000
committerGerrit Pape <pape@smarden.org>2002-09-26 11:19:08 +0000
commit25e557bdc3b889d4fc0f43abb2d1405f2a5e5bb7 (patch)
tree526a73fc0e1ca0f703450b6a0f2a8f6186bea2b2 /etc/openbsd
parent9f07ba95a4e18f06fbf329905ae0ad4cf86c3f99 (diff)
downloadrunit-25e557bdc3b889d4fc0f43abb2d1405f2a5e5bb7.tar.gz
runit-25e557bdc3b889d4fc0f43abb2d1405f2a5e5bb7.tar.xz
runit-25e557bdc3b889d4fc0f43abb2d1405f2a5e5bb7.zip
adapt stage 3.
Diffstat (limited to 'etc/openbsd')
-rwxr-xr-xetc/openbsd/326
1 files changed, 8 insertions, 18 deletions
diff --git a/etc/openbsd/3 b/etc/openbsd/3
index 192c6d8..486c7d1 100755
--- a/etc/openbsd/3
+++ b/etc/openbsd/3
@@ -1,26 +1,16 @@
 #!/bin/sh
-PATH=/bin:/sbin:/command
+exec 2>&1
 
-echo 'Stopping getties...'
-svc -d /service/getty-*
-svwaitdown -t14 /service/getty-* || ( echo 'Killing getties...' ; \
-  svc -k /service/getty-* ; svwaitdown /service/getty-* )
+LAST=0
+test -r /etc/runit/reboot && LAST=6
 
-echo 'Stopping services...'
-svc -d /service/*
-svwaitdown -t350 /service/* || ( echo 'Killing services...' ; \
-  svc -k /service/* ; svwaitdown /service/* )
+echo 'Waiting for getties to stop...'
+/command/svwaitdown -xk -t14 /service/getty-*
 
-echo 'Stopping log services...'
-svc -d /service/*/log
-svwaitdown -t35 /service/*/log || ( echo 'Killing log services...' ; \
-  svc -k /service/*/log ; svwaitdown /service/*/log )
+echo 'Waiting for services to stop...'
+/command/svwaitdown -xk -t350 /service/*
 
 echo 'Shutdown...'
-if test -r /etc/runit/reboot; then
-  exec reboot
-else
-  exec halt
-fi
+/etc/init.d/rc $LAST
 
 exit 0