diff options
author | bsd <bsd@FreeBSD.org> | 2000-04-16 02:28:42 +0000 |
---|---|---|
committer | bsd <bsd@FreeBSD.org> | 2000-04-16 02:28:42 +0000 |
commit | d70e245fbf72d354b2632f90779a49eb0215eea0 (patch) | |
tree | 8d0118b465e537b669d3fd6d4b4b67c98b260517 /etc | |
parent | caa348da176e63c8a370766170581f32cf9a9d63 (diff) | |
download | FreeBSD-src-d70e245fbf72d354b2632f90779a49eb0215eea0.zip FreeBSD-src-d70e245fbf72d354b2632f90779a49eb0215eea0.tar.gz |
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.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.firewall | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/rc.firewall b/etc/rc.firewall index 3742880..922fe14 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 ;; |