mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
Drivers, including those that support SR-IOV, can be loaded via kld_list and it makes sense to process iovctl configuration files afer all drivers have been loaded. MFC after: 1 week Sponsored by: Chelsio Communications Reviewed by: 0mp, jhb Differential Revision: https://reviews.freebsd.org/D47937
43 lines
510 B
Bash
Executable File
43 lines
510 B
Bash
Executable File
#!/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"
|