rc revision 126310
140123Sdes#!/bin/sh 266830Sobrien# 3126310Smtm# Copyright (c) 2000-2004 The FreeBSD Project 466830Sobrien# All rights reserved. 566830Sobrien# 666830Sobrien# Redistribution and use in source and binary forms, with or without 766830Sobrien# modification, are permitted provided that the following conditions 866830Sobrien# are met: 966830Sobrien# 1. Redistributions of source code must retain the above copyright 1066830Sobrien# notice, this list of conditions and the following disclaimer. 1166830Sobrien# 2. Redistributions in binary form must reproduce the above copyright 1266830Sobrien# notice, this list of conditions and the following disclaimer in the 1366830Sobrien# documentation and/or other materials provided with the distribution. 1466830Sobrien# 1566830Sobrien# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1666830Sobrien# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1766830Sobrien# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1866830Sobrien# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1966830Sobrien# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2066830Sobrien# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2166830Sobrien# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2266830Sobrien# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2366830Sobrien# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2466830Sobrien# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2566830Sobrien# SUCH DAMAGE. 2666830Sobrien# 2783871Sobrien# @(#)rc 5.27 (Berkeley) 6/5/91 2850472Speter# $FreeBSD: head/etc/rc 126310 2004-02-27 10:44:33Z mtm $ 2966830Sobrien# 3037Srgrimes 3137Srgrimes# System startup script run by init on autoboot 3237Srgrimes# or after single-user. 3337Srgrimes# Output and error are redirected to console by init, 3437Srgrimes# and the console is the controlling terminal. 3537Srgrimes 3651231Ssheldonh# Note that almost all of the user-configurable behavior is no longer in 3751231Ssheldonh# this file, but rather in /etc/defaults/rc.conf. Please check that file 3851231Ssheldonh# first before contemplating any changes here. If you do need to change 3951231Ssheldonh# this file for some reason, we would like to know about it. 408460Sjkh 4137Srgrimesstty status '^T' 4237Srgrimes 4337Srgrimes# Set shell to ignore SIGINT (2), but not children; 4437Srgrimes# shell catches SIGQUIT (3) and returns to single user after fsck. 4551231Ssheldonh# 4637Srgrimestrap : 2 4737Srgrimestrap : 3 # shouldn't be needed 4837Srgrimes 4951231SsheldonhHOME=/ 5092441ScjcPATH=/sbin:/bin:/usr/sbin:/usr/bin 5151231Ssheldonhexport HOME PATH 5237Srgrimes 53114492Sdougb. /etc/rc.subr 54114492Sdougb 55114492Sdougb# Note: the system configuration files are loaded as part of 56114492Sdougb# the RCNG system (rc.d/rccond). Do not load them here as it may 57114492Sdougb# interfere with diskless booting. 5898189Sgordon# 59114492Sdougbif [ "$1" = autoboot ]; then 60114492Sdougb autoboot=yes 61114492Sdougb _boot="faststart" 62114492Sdougb rc_fast=yes # run_rc_command(): do fast booting 63108200Sdillonelse 64114492Sdougb autoboot=no 65114492Sdougb _boot="start" 6698189Sgordonfi 6798189Sgordon 68114492Sdougbos=`eval ${CMD_OSTYPE}` 69126310Smtmskip="nostart" 70126310Smtm[ `/sbin/sysctl -n security.jail.jailed` -eq 1 ] && skip="$skip nojail" 71126310Smtmfiles=`rcorder -k ${os} -s ${skip} /etc/rc.d/* 2>/dev/null` 7298189Sgordon 73114492Sdougbfor _rc_elem in ${files}; do 74114492Sdougb run_rc_script ${_rc_elem} ${_boot} 7588531Ssheldonhdone 7651231Ssheldonh 7770109Sdougbecho '' 7837Srgrimesdate 7937Srgrimesexit 0 80