Add an rc.d script to invoke iovctl(8) during boot
Differential Revision: https://reviews.freebsd.org/D88 Reviewed by: wblock, emaste, allanjude MFC after: 1 month Relnotes: yes Sponsored by: Sandvine Inc.
This commit is contained in:
parent
1905e4a3fd
commit
6888132b53
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=279463
@ -667,6 +667,8 @@ casperd_enable="YES" # casperd(8) daemon
|
||||
rctl_enable="NO" # Load rctl(8) rules on boot
|
||||
rctl_rules="/etc/rctl.conf" # rctl(8) ruleset. See rctl.conf(5).
|
||||
|
||||
iovctl_files="" # Config files for iovctl(8)
|
||||
|
||||
##############################################################
|
||||
### Jail Configuration (see rc.conf(5) manual page) ##########
|
||||
##############################################################
|
||||
|
@ -44,6 +44,7 @@ FILES= DAEMON \
|
||||
hostid \
|
||||
hostid_save \
|
||||
hostname \
|
||||
iovctl \
|
||||
ip6addrctl \
|
||||
ipfilter \
|
||||
ipfs \
|
||||
|
39
etc/rc.d/iovctl
Normal file
39
etc/rc.d/iovctl
Normal file
@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: iovctl
|
||||
# REQUIRE: FILESYSTEMS sysctl
|
||||
|
||||
. /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 -E
|
||||
}
|
||||
|
||||
iovctl_stop()
|
||||
{
|
||||
run_iovctl -D
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
@ -26,7 +26,7 @@
|
||||
#
|
||||
|
||||
# PROVIDE: netif
|
||||
# REQUIRE: atm1 FILESYSTEMS serial sppp sysctl
|
||||
# REQUIRE: atm1 FILESYSTEMS iovctl serial sppp sysctl
|
||||
# REQUIRE: ipfilter ipfs
|
||||
# KEYWORD: nojailvnet
|
||||
|
||||
|
@ -4447,6 +4447,11 @@ This variables contains the
|
||||
.Xr rctl.conf 5
|
||||
ruleset to load for
|
||||
.Xr rctl 8 .
|
||||
.It Va iovctl_files
|
||||
.Pq Vt str
|
||||
A space-separated list of configuration files used by
|
||||
.Xr iovctl 8 .
|
||||
The default value is an empty string.
|
||||
.El
|
||||
.Sh FILES
|
||||
.Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact
|
||||
@ -4500,6 +4505,7 @@ ruleset to load for
|
||||
.Xr hcsecd 8 ,
|
||||
.Xr ifconfig 8 ,
|
||||
.Xr inetd 8 ,
|
||||
.Xr iovctl 8 ,
|
||||
.Xr ipf 8 ,
|
||||
.Xr ipfw 8 ,
|
||||
.Xr ipnat 8 ,
|
||||
|
Loading…
Reference in New Issue
Block a user