]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - etc/rc.d/ddb
- Add descriptions to most of the rc scripts. Those are mostly taken from their
[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 stop_cmd=":"
19
20 ddb_prestart()
21 {
22         # Silently exit if ddb is not enabled
23         if [ -z "`sysctl -Nq debug.ddb.scripting.scripts`" ]; then
24                 return 1
25         fi
26 }
27
28 load_rc_config $name
29
30 required_files="${ddb_config}"
31 command_args="${ddb_config}"
32
33 run_rc_command "$1"