xref: /freebsd/libexec/rc/rc.d/dmesg (revision 62cfcf62f627e5093fb37026a6d8c98e4d2ef04c)
1#!/bin/sh
2#
3# $FreeBSD$
4#
5
6# PROVIDE: dmesg
7# REQUIRE: mountcritremote FILESYSTEMS
8# BEFORE:  DAEMON
9# KEYWORD: nojail
10
11. /etc/rc.subr
12
13name="dmesg"
14desc="Save kernel boot messages to disk"
15rcvar="dmesg_enable"
16dmesg_file="/var/run/dmesg.boot"
17start_cmd="do_dmesg"
18stop_cmd=":"
19
20do_dmesg()
21{
22	rm -f ${dmesg_file}
23	( umask 022 ; /sbin/dmesg $rc_flags > ${dmesg_file} )
24}
25
26load_rc_config $name
27run_rc_command "$1"
28