summaryrefslogtreecommitdiff
blob: bea8568a0de62f955d1de2ff5de2b2536d0a0b02 (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
28
29
30
31
32
33
# /lib/rcscripts/addons/bootlogger.sh:  Handle logging of output at boot
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

if [[ -x /sbin/blogd ]] ; then

bootlog() {
	[[ ${RC_BOOTLOG} == "yes" ]] || return 0

	local opt=$1
	shift
	case ${opt} in
	start) blogd_start "$@";;
	sync)  blogd_sync "$@";;
	quit)  blogd_quit "$@";;
	esac
}

blogd_start() {
	/sbin/blogd -q
}

blogd_sync() {
	echo > /var/log/boot.msg
	killall -IO blogd
}

blogd_quit() {
	killall -QUIT blogd
}

fi