3 (431B)
1 #!/bin/sh 2 exec 2>&1 3 4 PATH=/sbin:/usr/sbin:/bin:/usr/bin 5 SVDIR=/var/lib/runit/service 6 7 LAST=0 8 9 # While test -x is more natural, it does not consider file with 10 # executable bit set on 'noexec' filesystem as executable, and /run 11 # often is mounted as 'noexec'. 12 [ $(stat -c %a /run/runit.reboot) = 100 ] && LAST=6 13 14 echo 'Waiting for services to stop...' 15 sv force-stop $SVDIR/* 16 sv exit $SVDIR/* 17 18 echo 'Shutdown...' 19 /etc/init.d/rc $LAST