From 2ee229e5c325701a83f381028c31080e24348249 Mon Sep 17 00:00:00 2001 From: "Brian S. Dean" Date: Sun, 16 Apr 2000 02:28:42 +0000 Subject: [PATCH] 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. --- etc/rc.firewall | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/rc.firewall b/etc/rc.firewall index 37428808e7a2..922fe14f1321 100644 --- a/etc/rc.firewall +++ b/etc/rc.firewall @@ -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 ;;