summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/dumpon
blob: f0ab4377a7280bcb7e7009e7d50c3fc0203a42bf (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
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: dumpon
# REQUIRE: initrandom
# BEFORE: disks savecore
# KEYWORD: FreeBSD

. /etc/rc.subr

name="dumpon"
start_cmd="dumpon_start"
stop_cmd="dumpon_stop"

dumpon_start()
{
	# Enable dumpdev so that savecore can see it. Enable it
	# early so a crash early in the boot process can be caught.
	#
	case ${dumpdev} in
	[Nn][Oo] | '')
		;;
	*)
		/sbin/dumpon -v ${dumpdev}
		;;
	esac
}

dumpon_stop()
{
	case ${dumpdev} in
	[Nn][Oo] | '')
		;;
	*)
		/sbin/dumpon -v off
		;;
	esac
}

load_rc_config $name
run_rc_command "$1"
OpenPOWER on IntegriCloud