You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-process/runit/files/3-2.1.2

15 lines
388 B

#!/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