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