blob: 192c6d871c7439cc0b43e12ff7fd8455181c888e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/sh
PATH=/bin:/sbin:/command
echo 'Stopping getties...'
svc -d /service/getty-*
svwaitdown -t14 /service/getty-* || ( echo 'Killing getties...' ; \
svc -k /service/getty-* ; svwaitdown /service/getty-* )
echo 'Stopping services...'
svc -d /service/*
svwaitdown -t350 /service/* || ( echo 'Killing services...' ; \
svc -k /service/* ; svwaitdown /service/* )
echo 'Stopping log services...'
svc -d /service/*/log
svwaitdown -t35 /service/*/log || ( echo 'Killing log services...' ; \
svc -k /service/*/log ; svwaitdown /service/*/log )
echo 'Shutdown...'
if test -r /etc/runit/reboot; then
exec reboot
else
exec halt
fi
exit 0
|