Files
Navdeep Parhar 41594021fa rc.d/iovctl: Start the iovctl service after kld.
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
2025-02-07 12:17:32 -08:00

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"