#!/bin/sh # /etc/runit/3 - system shutdown tasks # # This script runs the contents of /etc/runit/rc.3/ to bring the system down for # halt or reboot. Comments in /etc/runit/1 are also applicable here. LC_ALL="C.UTF-8" PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin" SVDIR="/etc/service" export LC_ALL PATH SVDIR # Make a best effort to put all our output on tty1. chvt 1 exec >/dev/tty1 2>&1 stty sane for f in /etc/runit/rc.3/*; do test -x "${f}" || continue "${f}" exit_code=$? test "${exit_code}" -ge 100 -a "${exit_code}" -le 127 && exit "${exit_code}" done exit 0