blob: 182151e723d095ab8c6527abce4065492901a47b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/sh
exec >/dev/console 2>&1
PATH=/sbin:/usr/sbin:/bin:/usr/bin
echo 'Waiting for getties to stop...'
svwaitdown -xk -t10 /var/service/getty-*
echo 'Waiting for services to stop...'
svwaitdown -xk -t300 /var/service/*
echo 'Shutdown...'
test -x /etc/runit/reboot && LAST=6 || LAST=0
test -x /etc/runit/reboot && RC=reboot || RC=shutdown
RUNLEVEL=$LAST /sbin/rc $RC
|