mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-20 08:44:33 +00:00
Allow the firewall rules to be established by a shell script instead
of forcing them to be an 'ipfw' rules file. This allows one to determine interface addresses dynamically, etc. The rule is if the file referenced by ${firewall_type} is executable, it is sourced, but if it is just readable, it is used as input to 'ipfw' like before.
This commit is contained in:
parent
eb569950b2
commit
2ee229e5c3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59270
|
@ -228,7 +228,9 @@ case ${firewall_type} in
|
|||
[Uu][Nn][Kk][Nn][Oo][Ww][Nn])
|
||||
;;
|
||||
*)
|
||||
if [ -r "${firewall_type}" ]; then
|
||||
if [ -x "${firewall_type}" ]; then
|
||||
. ${firewall_type}
|
||||
elif [ -r "${firewall_type}" ]; then
|
||||
${fwcmd} ${firewall_flags} ${firewall_type}
|
||||
fi
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue