source: src-sh/pc-extractoverlay/desktop-overlay/etc/rc.delay @ bb6089a

9.1-release9.2-releasereleng/10.0releng/10.0.1
Last change on this file since bb6089a was 1620346, checked in by Kris Moore <kris@…>, 12 months ago

Initial import of PC-BSD /current/ SVN repo

  • Property mode set to 100644
File size: 3.2 KB
Line 
1#!/bin/sh
2#
3# Copyright (c) 2000-2004  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:
9# 1. Redistributions of source code must retain the above copyright
10#    notice, this list of conditions and the following disclaimer.
11# 2. Redistributions in binary form must reproduce the above copyright
12#    notice, this list of conditions and the following disclaimer in the
13#    documentation and/or other materials provided with the distribution.
14#
15# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
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$
29#
30
31# Delayed system startup script run by /etc/rc after bootup
32# Output and error are redirected to /var/log/rc_delay.log
33
34# Note that almost all of the user-configurable behavior is no longer in
35# this file, but rather in /etc/defaults/rc.conf.  Please check that file
36# first before contemplating any changes here.  If you do need to change
37# this file for some reason, we would like to know about it.
38
39stty status '^T'
40
41# Set shell to ignore SIGINT (2), but not children;
42# shell catches SIGQUIT (3) and returns to single user.
43#
44trap : 2
45trap "echo 'Boot interrupted'; exit 1" 3
46
47HOME=/
48PATH=/sbin:/bin:/usr/sbin:/usr/bin
49export HOME PATH
50
51autoboot=yes
52_boot="faststart"
53rc_fast=yes        # run_rc_command(): do fast booting
54_log="/var/log/rc_delay.log"
55echo "Starting delayed services `date`" > $_log
56
57dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null`
58if [ ${dlv:=0} -ne 0 -o -f /etc/diskless ]; then
59        sh /etc/rc.initdiskless
60fi
61
62# Run these after determining whether we are booting diskless in order
63# to minimize the number of files that are needed on a diskless system,
64# and to make the configuration file variables available to rc itself.
65#
66. /etc/rc.subr
67load_rc_config 'XXX'
68
69skip="-s nostart"
70if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then
71        skip="$skip -s nojail"
72        if [ "$early_late_divider" = "FILESYSTEMS" ]; then
73                early_late_divider=NETWORKING
74        fi
75fi
76
77unset files local_rc
78_rc_elem_done="$1"
79
80# Now that disks are mounted, for each dir in $local_startup
81# search for init scripts that use the new rc.d semantics.
82#
83case ${local_startup} in
84[Nn][Oo] | '') ;;
85*)      find_local_scripts_new ;;
86esac
87
88files=`rcorder ${skip} /etc/rc.d/* ${local_rc} 2>/dev/null`
89for _rc_elem in ${files}; do
90        case "$_rc_elem_done" in
91        *" $_rc_elem "*)        continue ;;
92        esac
93
94        run_rc_script ${_rc_elem} ${_boot} >>${_log}
95done
96
97echo "Finished starting delayed services `date`" >> $_log
98exit 0
Note: See TracBrowser for help on using the repository browser.