summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/ddb
blob: f4d34b198b455ced71df40b79a1b779698ba0e0a (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
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: ddb
# REQUIRE: dumpon
# BEFORE: disks savecore initrandom
# KEYWORD: nojail

. /etc/rc.subr

name="ddb"
rcvar=`set_rcvar`
command="/sbin/${name}"
start_precmd="ddb_prestart"
stop_cmd=":"

ddb_prestart()
{
	# Silently exit if ddb is not enabled
	if [ -z "`sysctl -Nq debug.ddb.scripting.scripts`" ]; then
		return 1
	fi
}

load_rc_config $name

required_files="${ddb_config}"
command_args="${ddb_config}"

run_rc_command "$1"
OpenPOWER on IntegriCloud