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:
Brian S. Dean 2000-04-16 02:28:42 +00:00
parent eb569950b2
commit 2ee229e5c3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59270

View file

@ -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
;;