summaryrefslogtreecommitdiff
blob: 352a006211c5f752d7c53533974c163f4f197a1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/bootchart2/files/bootchart2.init,v 1.3 2012/04/04 06:11:34 jlec Exp $

depend() {
	use localmount
}

start() {
	if /bin/grep -q "rdinitrd=/sbin/bootchartd" /proc/cmdline; then
		if /bin/pidof bootchart-collector> /dev/null 2>&1; then
			ebegin "Scheduling termination of Bootchart"
			/sbin/bootchartd start
			/sbin/bootchartd wait &
			eend $?
		fi
	else
		einfo "No bootchart process found!"
		eindent
		einfo "This script does not start bootchart, but only schedules its termination."
		einfo "Bootchart should be started from the kernel command line."
		einfo "Please check the README on how to do that."
		eoutdent
		eend 0
	fi	
}