summaryrefslogtreecommitdiff
path: root/libexec/rc/rc.d/iovctl
blob: 70dc783aafb0c1fedba46fb348a8c9cdfc91046b (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
#!/bin/sh
#
#

# PROVIDE: iovctl
# REQUIRE: FILESYSTEMS sysctl kld

. /etc/rc.subr

name="iovctl"
command="/usr/sbin/iovctl"
start_cmd="iovctl_start"
stop_cmd="iovctl_stop"

run_iovctl()
{
	local _f flag

	flag=$1
	for _f in ${iovctl_files} ; do
		if [ -r ${_f} ]; then
			${command} ${flag} -f ${_f} > /dev/null
		fi
	done
}

iovctl_start()
{
	run_iovctl -C
}

iovctl_stop()
{
	run_iovctl -D
}

load_rc_config $name

# doesn't make sense to run in a svcj: config setting
iovctl_svcj="NO"

run_rc_command "$1"