#!/bin/sh # /etc/runit/1 - system one-time tasks # # This script runs the contents of /etc/runit/rc.1/ to get your system into a # reasonable state. If you need to add system-specific one-shot tasks, you can # add them there, make use of OpenRC's existing /etc/local.d/ facility, etc. # Don't change these variables - they should be the same across all 3 stages. 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 # Only items with the execute bit set will be run; chmod u-x is the intended way # to disable them. Files in directories like these should follow the traditional # convention of a 2-digit numeric prefix for ordering, and will be ASCII-sorted. for f in /etc/runit/rc.1/*; do test -x "${f}" || continue "${f}" # Abort on receiving exit codes in the supervision magic number range (1xx). # Use with caution: 100 in particular will induce runit to skip stage 2. # Exit codes ≥ 128 include generic segfaults and are specifically ignored. exit_code=$? test 100 -le "${exit_code}" -a "${exit_code}" -le 127 && exit "${exit_code}" done exit 0