Changeset View
Changeset View
Standalone View
Standalone View
libexec/rc/rc
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | |||||
# If the firstboot sentinel doesn't exist, we want to skip firstboot scripts. | # If the firstboot sentinel doesn't exist, we want to skip firstboot scripts. | ||||
if ! [ -e ${firstboot_sentinel} ]; then | if ! [ -e ${firstboot_sentinel} ]; then | ||||
skip_firstboot="-s firstboot" | skip_firstboot="-s firstboot" | ||||
fi | fi | ||||
# Do a first pass to get everything up to $early_late_divider so that | # Do a first pass to get everything up to $early_late_divider so that | ||||
# we can do a second pass that includes $local_startup directories | # we can do a second pass that includes $local_startup directories | ||||
# | # | ||||
files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* 2>/dev/null` | unset system_rc | ||||
find_system_scripts | |||||
files=`rcorder ${skip} ${skip_firstboot} ${system_rc} 2>/dev/null` | |||||
_rc_elem_done=' ' | _rc_elem_done=' ' | ||||
for _rc_elem in ${files}; do | for _rc_elem in ${files}; do | ||||
run_rc_script ${_rc_elem} ${_boot} | run_rc_script ${_rc_elem} ${_boot} | ||||
_rc_elem_done="${_rc_elem_done}${_rc_elem} " | _rc_elem_done="${_rc_elem_done}${_rc_elem} " | ||||
case "$_rc_elem" in | case "$_rc_elem" in | ||||
*/${early_late_divider}) break ;; | */${early_late_divider}) break ;; | ||||
esac | esac | ||||
done | done | ||||
unset files local_rc | unset files local_rc system_rc | ||||
# Now that disks are mounted, for each dir in $local_startup | # Now that disks are mounted, for each dir in $local_startup | ||||
# search for init scripts that use the new rc.d semantics. | # search for init scripts that use the new rc.d semantics. | ||||
# | # | ||||
case ${local_startup} in | case ${local_startup} in | ||||
[Nn][Oo] | '') ;; | [Nn][Oo] | '') ;; | ||||
*) find_local_scripts_new ;; | *) find_local_scripts_new ;; | ||||
esac | esac | ||||
# The firstboot sentinel might be on a newly mounted filesystem; look for it | # The firstboot sentinel might be on a newly mounted filesystem; look for it | ||||
# again and unset skip_firstboot if we find it. | # again and unset skip_firstboot if we find it. | ||||
if [ -e ${firstboot_sentinel} ]; then | if [ -e ${firstboot_sentinel} ]; then | ||||
skip_firstboot="" | skip_firstboot="" | ||||
fi | fi | ||||
files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} 2>/dev/null` | find_system_scripts | ||||
files=`rcorder ${skip} ${skip_firstboot} ${system_rc} ${local_rc} 2>/dev/null` | |||||
for _rc_elem in ${files}; do | for _rc_elem in ${files}; do | ||||
case "$_rc_elem_done" in | case "$_rc_elem_done" in | ||||
*" $_rc_elem "*) continue ;; | *" $_rc_elem "*) continue ;; | ||||
esac | esac | ||||
run_rc_script ${_rc_elem} ${_boot} | run_rc_script ${_rc_elem} ${_boot} | ||||
done | done | ||||
Show All 21 Lines |