summaryrefslogtreecommitdiff
blob: 30e602cdae96e776887a0e3e94137a6baf03f7ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
exec >/dev/console 2>&1
PATH=/sbin:/usr/sbin:/bin:/usr/bin

echo 'Waiting for getties to stop...'
sv -w 10 force-shutdown /etc/service/getty-*

echo 'Waiting for services to stop...'
sv -w 300 force-shutdown /etc/service/*

echo 'Shutdown...'
test -x /etc/runit/reboot && LAST=6    || LAST=0
test -x /etc/runit/reboot && RC=reboot || RC=shutdown
RUNLEVEL=$LAST /sbin/openrc $RC