addc1b6ce4
r288291 added a call to limits(1), which isn't available before partitions are mounted. This broke the ddb rc script, which does not provide its own start_cmd. Alleviate the situation here by providing a start_cmd. We still have other problems with diskless setups that need to be considered, but this is a start. PR: 206291 Submitted by: cy Discussed with: rgrimes MFC after: 3 days
40 lines
538 B
Bash
Executable File
40 lines
538 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: ddb
|
|
# REQUIRE: dumpon
|
|
# BEFORE: disks
|
|
# KEYWORD: nojail
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="ddb"
|
|
desc="DDB kernel debugger"
|
|
rcvar="ddb_enable"
|
|
command="/sbin/${name}"
|
|
start_precmd="ddb_prestart"
|
|
start_cmd="ddb_start"
|
|
stop_cmd=":"
|
|
|
|
ddb_prestart()
|
|
{
|
|
# Silently exit if ddb is not enabled
|
|
if [ -z "`sysctl -Nq debug.ddb.scripting.scripts`" ]; then
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
ddb_start()
|
|
{
|
|
${command} ${command_args}
|
|
}
|
|
|
|
load_rc_config $name
|
|
|
|
required_files="${ddb_config}"
|
|
command_args="${ddb_config}"
|
|
|
|
run_rc_command "$1"
|