opnsense-src/libexec/rc/rc.d/iovctl
Navdeep Parhar 03bbfb01cc 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.

Sponsored by:	Chelsio Communications
Reviewed by:	0mp, jhb
Differential Revision:	https://reviews.freebsd.org/D47937

(cherry picked from commit 41594021fa8bf02468407e8fc48c2e7a13de1a2f)
2025-02-13 20:57:54 -08:00

38 lines
437 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
run_rc_command "$1"