summary refs log tree commit diff
path: root/etc/freebsd
diff options
context:
space:
mode:
Diffstat (limited to 'etc/freebsd')
-rwxr-xr-xetc/freebsd/323
1 files changed, 9 insertions, 14 deletions
diff --git a/etc/freebsd/3 b/etc/freebsd/3
index d2514c4..486c7d1 100755
--- a/etc/freebsd/3
+++ b/etc/freebsd/3
@@ -1,21 +1,16 @@
 #!/bin/sh
-PATH=/bin:/sbin:/command
+exec 2>&1
 
-echo 'Stopping services...'
-svc -d /service/*
-svwaitdown -t350 /service/* || ( echo 'Killing services...' ; \
-  svc -k /service/* ; svwaitdown /service/* )
+LAST=0
+test -r /etc/runit/reboot && LAST=6
 
-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 getties to stop...'
+/command/svwaitdown -xk -t14 /service/getty-*
+
+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