]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - etc/rc.d/ddb
Add UPDATING entries and bump version.
[FreeBSD/FreeBSD.git] / etc / rc.d / ddb
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5
6 # PROVIDE: ddb
7 # REQUIRE: dumpon
8 # BEFORE: disks
9 # KEYWORD: nojail
10
11 . /etc/rc.subr
12
13 name="ddb"
14 desc="DDB kernel debugger"
15 rcvar="ddb_enable"
16 command="/sbin/${name}"
17 start_precmd="ddb_prestart"
18 start_cmd="ddb_start"
19 stop_cmd=":"
20
21 ddb_prestart()
22 {
23         # Silently exit if ddb is not enabled
24         if [ -z "`sysctl -Nq debug.ddb.scripting.scripts`" ]; then
25                 return 1
26         fi
27 }
28
29 ddb_start()
30 {
31         ${command} ${command_args}
32 }
33
34 load_rc_config $name
35
36 required_files="${ddb_config}"
37 command_args="${ddb_config}"
38
39 run_rc_command "$1"