rc (108191) | rc (108200) |
---|---|
1#!/bin/sh 2# 3# Copyright (c) 2000 The FreeBSD Project 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 11 unchanged lines hidden (view full) --- 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# 27# @(#)rc 5.27 (Berkeley) 6/5/91 | 1#!/bin/sh 2# 3# Copyright (c) 2000 The FreeBSD Project 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 11 unchanged lines hidden (view full) --- 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# 27# @(#)rc 5.27 (Berkeley) 6/5/91 |
28# $FreeBSD: head/etc/rc 108191 2002-12-22 22:18:41Z dillon $ | 28# $FreeBSD: head/etc/rc 108200 2002-12-23 07:09:44Z dillon $ |
29# 30 31# System startup script run by init on autoboot 32# or after single-user. 33# Output and error are redirected to console by init, 34# and the console is the controlling terminal. 35 36# Note that almost all of the user-configurable behavior is no longer in --- 8 unchanged lines hidden (view full) --- 45# 46trap : 2 47trap : 3 # shouldn't be needed 48 49HOME=/ 50PATH=/sbin:/bin:/usr/sbin:/usr/bin 51export HOME PATH 52 | 29# 30 31# System startup script run by init on autoboot 32# or after single-user. 33# Output and error are redirected to console by init, 34# and the console is the controlling terminal. 35 36# Note that almost all of the user-configurable behavior is no longer in --- 8 unchanged lines hidden (view full) --- 45# 46trap : 2 47trap : 3 # shouldn't be needed 48 49HOME=/ 50PATH=/sbin:/bin:/usr/sbin:/usr/bin 51export HOME PATH 52 |
53# If there is a global system configuration file, suck it in. 54# XXX - The only purpose of duplicating it here is to catch rc_ng="YES" | 53# check_rcng() is run in a subshell solely to determine the 54# RCNG mode. We do not want to pollute our variable space 55# too soon so the procedure must be run in a subshell. An 56# exit code of 3 indicates RCNG is enabled. |
55# | 57# |
56if [ -r /etc/defaults/rc.conf ]; then 57 . /etc/defaults/rc.conf 58 source_rc_confs 59elif [ -r /etc/rc.conf ]; then 60 . /etc/rc.conf 61fi | 58check_rcng() 59{ 60 if [ -r /etc/defaults/rc.conf ]; then 61 . /etc/defaults/rc.conf 62 source_rc_confs 63 elif [ -r /etc/rc.conf ]; then 64 . /etc/rc.conf 65 fi |
62 | 66 |
63# Diskless setups have to depend on a different mechanism since 64# their config files haven't been retargeted yet. 65# 66[ -e /.rcng_yes ] && rc_ng="YES" | 67 # Diskless setups have to depend on a different mechanism since 68 # their config files haven't been retargeted yet. 69 # 70 [ -e /.rcng_yes ] && rc_ng="YES" 71 case ${rc_ng} in 72 [Yy][Ee][Ss]) 73 exit 3 74 ;; 75 *) 76 exit 0 77 ;; 78 esac 79} |
67 | 80 |
81( check_rcng ) 82if [ $? = 3 ]; then 83 rc_ng=YES 84else 85 rc_ng=NO 86fi 87 |
|
68case ${rc_ng} in | 88case ${rc_ng} in |
69[Yy][Ee][Ss]) | 89YES) |
70 . /etc/rc.subr 71 72 # Note: the system configuration files are loaded as part of 73 # the RCNG system (rc.d/rccond). Do not load them here as it may 74 # interfere with diskless booting. 75 # 76 if [ "$1" = autoboot ]; then 77 autoboot=yes --- 916 unchanged lines hidden --- | 90 . /etc/rc.subr 91 92 # Note: the system configuration files are loaded as part of 93 # the RCNG system (rc.d/rccond). Do not load them here as it may 94 # interfere with diskless booting. 95 # 96 if [ "$1" = autoboot ]; then 97 autoboot=yes --- 916 unchanged lines hidden --- |