#! /bin/sh
# chkconfig: 2345 99 1
# description: bootchart init analyzer
### BEGIN INIT INFO
# Provides: bootchart
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Should-Start:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: bootchart init analyzer
# Description: Stop and flush bootchartd init analyzer
# X-Start-Before:
# X-Stop-After:
# X-Timesys-Start-Number:  99
# X-Timesys-Stop-Number:  1
### END INIT INFO

# This script is only used to terminate bootchartd after it was used to
# benchmark init and flush out the /var/log/bootchart.tgz tarball.
#
# This script can be safely disabled and bootchart stopped at a developers
# whim instead of at the end of the initscripts.

case "$1" in
start)
	grep -q /sbin/bootchartd /proc/cmdline && /sbin/bootchartd stop
	;;
esac

exit 0
