|
|
fi | fi |
eend $? | eend $? |
| |
|
# start logging here |
|
[ -x /sbin/bootlog ] && /sbin/bootlog start |
|
|
# Read off the kernel commandline to see if there's any special settings | # Read off the kernel commandline to see if there's any special settings |
# especially check to see if we need to set the CDBOOT environment variable | # especially check to see if we need to set the CDBOOT environment variable |
# Note: /proc MUST be mounted | # Note: /proc MUST be mounted |
|
|
| |
start_critical_service() { | start_critical_service() { |
( | ( |
|
local service="$1" |
|
|
|
process_name "${service}" |
|
|
local retval= | local retval= |
| |
source "/etc/init.d/${x}" || eerror "Failed to source /etc/init.d/${x}" |
source "/etc/init.d/${service}" || eerror "Failed to source /etc/init.d/${service}" |
retval=$? | retval=$? |
[ "${retval}" -ne 0 ] && return "${retval}" | [ "${retval}" -ne 0 ] && return "${retval}" |
[ -e "/etc/conf.d/${x}" ] && source "/etc/conf.d/${x}" |
[ -e "/etc/conf.d/${service}" ] && source "/etc/conf.d/${service}" |
source /etc/rc.conf | source /etc/rc.conf |
| |
start || eerror "Failed to start /etc/init.d/${x}" |
start || eerror "Failed to start /etc/init.d/${service}" |
retval=$? | retval=$? |
| |
return "${retval}" | return "${retval}" |
|
|
# Now that the dependency cache are up to date, make sure these | # Now that the dependency cache are up to date, make sure these |
# are marked as started ... | # are marked as started ... |
( | ( |
|
process_name mark "${x}" started |
|
|
# Needed for mark_service_started() | # Needed for mark_service_started() |
source "${svclib}/sh/rc-services.sh" | source "${svclib}/sh/rc-services.sh" |
| |
|
|
# Runlevel end, so clear stale fail list | # Runlevel end, so clear stale fail list |
rm -rf "${svcdir}/failed" &>/dev/null | rm -rf "${svcdir}/failed" &>/dev/null |
| |
|
if [ -z "${BOOT}" ] && [ -x /sbin/bootlog ] ; then |
|
( |
|
process_name bootlog stop |
|
|
|
# wait a little bit to let X and the gettys get started |
|
# then stop logging. |
|
sleep 20 |
|
/sbin/bootlog stop |
|
) & |
|
fi |
|
|
# If we were in the boot runlevel, it is done now ... | # If we were in the boot runlevel, it is done now ... |
[ -n "${BOOT}" ] && unset BOOT | [ -n "${BOOT}" ] && unset BOOT |
| |
|
|
# This will override the splash() function... | # This will override the splash() function... |
[ -f /sbin/splash-functions.sh ] && source /sbin/splash-functions.sh | [ -f /sbin/splash-functions.sh ] && source /sbin/splash-functions.sh |
| |
|
# void process_name(...) |
|
# |
|
# Notify bootchart about a subshell and what name should |
|
# be used for it |
|
|
|
process_name() { |
|
return 0 |
|
} |
|
|
|
[ -f /sbin/bootchart-functions.sh ] && source /sbin/bootchart-functions.sh |
|
|
# void get_bootconfig() | # void get_bootconfig() |
# | # |
# Get the BOOTLEVEL and SOFTLEVEL by setting | # Get the BOOTLEVEL and SOFTLEVEL by setting |
|
|
mark_service_started "$1" | mark_service_started "$1" |
splash "svc_started" "$1" "0" | splash "svc_started" "$1" "0" |
else | else |
(. /sbin/runscript.sh "/etc/init.d/$1" start) |
( |
|
process_name "$1" |
|
|
|
. /sbin/runscript.sh "/etc/init.d/$1" start |
|
) |
retval="$?" | retval="$?" |
splash "svc_started" "$1" "${retval}" | splash "svc_started" "$1" "${retval}" |
return "${retval}" | return "${retval}" |