aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorEugene Grosbein <eugen@FreeBSD.org>2021-05-17 21:03:15 +0000
committerEugene Grosbein <eugen@FreeBSD.org>2021-05-17 21:03:15 +0000
commitf5b5de1a3210234f3a6864c88a2d3e11ac2dbf04 (patch)
tree6500a2eba5a0ab394ae2f1ffa75ff1d3eb2b726f /libexec
parent4224dbf4c7c497130150eafb0442f5306389e068 (diff)
Diffstat (limited to 'libexec')
-rwxr-xr-xlibexec/rc/rc.d/ipfw15
1 files changed, 14 insertions, 1 deletions
diff --git a/libexec/rc/rc.d/ipfw b/libexec/rc/rc.d/ipfw
index fd1c97671d70..22b65d2908cb 100755
--- a/libexec/rc/rc.d/ipfw
+++ b/libexec/rc/rc.d/ipfw
@@ -47,7 +47,7 @@ ipfw_prestart()
ipfw_start()
{
- local _firewall_type
+ local _firewall_type _module _sysctl_reload
if [ -n "${1}" ]; then
_firewall_type=$1
@@ -55,6 +55,19 @@ ipfw_start()
_firewall_type=${firewall_type}
fi
+ _sysctl_reload=no
+ for _module in ${required_modules}
+ do
+ if kldstat -qn ${_module}; then
+ _sysctl_reload=yes
+ break
+ fi
+ done
+
+ if [ ${_sysctl_reload} = yes ]; then
+ /etc/rc.d/sysctl reload
+ fi
+
# set the firewall rules script if none was specified
[ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall