named: conditionally copy files to chroot (rc-script)
[dragonfly.git] / etc / rc.d / dmesg
CommitLineData
9c600e7d
MD
1#!/bin/sh
2#
3# $NetBSD: dmesg,v 1.8 2002/03/22 04:33:58 thorpej Exp $
4# $FreeBSD: src/etc/rc.d/dmesg,v 1.2 2002/06/13 22:14:36 gordon Exp $
696a5717 5# $DragonFly: src/etc/rc.d/dmesg,v 1.3 2005/11/19 21:47:32 swildner Exp $
9c600e7d
MD
6#
7
8# PROVIDE: dmesg
9# REQUIRE: mountcritremote
10# BEFORE: DAEMON
696a5717 11# KEYWORD: Daemon
9c600e7d
MD
12
13. /etc/rc.subr
14
15name="dmesg"
16rcvar=`set_rcvar`
17dmesg_file="/var/run/dmesg.boot"
18start_cmd="do_dmesg"
19stop_cmd=":"
20
21do_dmesg()
22{
23 rm -f ${dmesg_file}
24 ( umask 022 ; /sbin/dmesg $rc_flags > ${dmesg_file} )
25}
26
27load_rc_config $name
28run_rc_command "$1"