--- /sbin/rc.orig 2004-12-13 12:14:45.000000000 -0600 +++ /sbin/rc 2004-12-13 13:26:52.010743576 -0600 @@ -143,6 +143,11 @@ fi eend $? + # start logging here + if [[ ${RC_USE_BOOTCHART} = "yes" ]] && [[ -x /sbin/bootlog ]] ; then + /sbin/bootlog start + fi + # 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 # Note: /proc MUST be mounted @@ -373,15 +378,19 @@ start_critical_service() { ( + local service="$1" + + process_name "${service}" + 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}" -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 - start || eerror "Failed to start /etc/init.d/${x}" + start || eerror "Failed to start /etc/init.d/${service}" retval=$? return "${retval}" @@ -475,6 +484,8 @@ # Now that the dependency cache are up to date, make sure these # are marked as started ... ( + process_name mark "${x}" started + # Needed for mark_service_started() source "${svclib}/sh/rc-services.sh" @@ -846,6 +857,17 @@ # Runlevel end, so clear stale fail list rm -rf "${svcdir}/failed" &>/dev/null +if [ -z "${BOOT}" ] && [[ ${RC_USE_BOOTCHART} = "yes" ]] && [[ -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 ... [ -n "${BOOT}" ] && unset BOOT --- /sbin/functions.sh.orig 2004-12-13 12:12:07.000000000 -0600 +++ /sbin/functions.sh 2004-12-13 13:28:49.959812592 -0600 @@ -63,6 +63,20 @@ # This will override the splash() function... [ -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 +} + +# This will override the process_name() function +if [[ ${RC_USE_BOOTCHART} = "yes" ]] && [[ -f /sbin/bootchart-functions.sh ]] ; then + source /sbin/bootchart-functions.sh +fi + # void get_bootconfig() # # Get the BOOTLEVEL and SOFTLEVEL by setting --- /lib/rcscripts/sh/rc-services.sh.orig 2004-12-13 12:40:01.000000000 -0600 +++ /lib/rcscripts/sh/rc-services.sh 2004-12-13 13:26:52.014742968 -0600 @@ -415,7 +415,11 @@ mark_service_started "$1" splash "svc_started" "$1" "0" else - (. /sbin/runscript.sh "/etc/init.d/$1" start) + ( + process_name "$1" + + . /sbin/runscript.sh "/etc/init.d/$1" start + ) retval="$?" splash "svc_started" "$1" "${retval}" return "${retval}" --- /etc/conf.d/rc.orig 2004-12-13 13:18:05.000000000 -0600 +++ /etc/conf.d/rc 2004-12-13 13:31:34.784755392 -0600 @@ -45,8 +45,11 @@ RC_DEVICE_TARBALL="yes" +# set to "yes" if you want the rc system to create the logs +# required for bootchart. You should also emerge bootchart +# to create and visualize the charz. - +RC_USE_BOOTCHART="yes" # # Controlling start-stop-daemon behavior