2001-06-16 07:16:14 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2002-06-13 22:14:37 +00:00
|
|
|
# $FreeBSD$
|
2001-06-16 07:16:14 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: dmesg
|
2012-09-11 05:04:59 +00:00
|
|
|
# REQUIRE: mountcritremote FILESYSTEMS
|
2002-06-13 22:14:37 +00:00
|
|
|
# BEFORE: DAEMON
|
2007-12-08 22:40:31 +00:00
|
|
|
# KEYWORD: nojail
|
2001-06-16 07:16:14 +00:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="dmesg"
|
2016-04-23 16:10:54 +00:00
|
|
|
desc="Save kernel boot messages to disk"
|
2012-01-14 02:18:41 +00:00
|
|
|
rcvar="dmesg_enable"
|
2002-06-13 22:14:37 +00:00
|
|
|
dmesg_file="/var/run/dmesg.boot"
|
2001-06-16 07:16:14 +00:00
|
|
|
start_cmd="do_dmesg"
|
|
|
|
stop_cmd=":"
|
|
|
|
|
|
|
|
do_dmesg()
|
|
|
|
{
|
2002-06-13 22:14:37 +00:00
|
|
|
rm -f ${dmesg_file}
|
|
|
|
( umask 022 ; /sbin/dmesg $rc_flags > ${dmesg_file} )
|
2001-06-16 07:16:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|