2008-03-05 19:32:58 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: ddb
|
|
|
|
# REQUIRE: dumpon
|
2010-05-19 21:03:19 +02:00
|
|
|
# BEFORE: disks
|
2008-03-05 19:32:58 +01:00
|
|
|
# KEYWORD: nojail
|
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="ddb"
|
2016-04-23 18:10:54 +02:00
|
|
|
desc="DDB kernel debugger"
|
2012-01-14 03:18:41 +01:00
|
|
|
rcvar="ddb_enable"
|
2008-03-05 19:32:58 +01:00
|
|
|
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"
|