Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc Allow to change the location of the pf ruleset with the ...



details:   https://anonhg.NetBSD.org/src/rev/dc906681a38d
branches:  trunk
changeset: 583440:dc906681a38d
user:      peter <peter%NetBSD.org@localhost>
date:      Sun Aug 07 01:03:39 2005 +0000

description:
Allow to change the location of the pf ruleset with the variable $pf_rules.

diffstat:

 etc/defaults/rc.conf |   4 ++--
 etc/rc.d/pf          |  14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

diffs (57 lines):

diff -r b8f3643c06cd -r dc906681a38d etc/defaults/rc.conf
--- a/etc/defaults/rc.conf      Sun Aug 07 00:53:13 2005 +0000
+++ b/etc/defaults/rc.conf      Sun Aug 07 01:03:39 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: rc.conf,v 1.65 2005/08/04 22:29:01 peter Exp $
+#      $NetBSD: rc.conf,v 1.66 2005/08/07 01:03:39 peter Exp $
 #
 # /etc/defaults/rc.conf --
 #      default configuration of /etc/rc.conf
@@ -144,7 +144,7 @@
 ipfs=NO                        ipfs_flags=""           # save/load ipnat and ipf states
 ipsec=NO                                       # uses /etc/ipsec.conf
 ipmon=NO               ipmon_flags="-Dns"      # syslog ipfilter messages
-pf=NO
+pf=NO                  pf_rules="/etc/pf.conf"
 pflogd=NO
 racoon=NO                                      # IKE daemon
 auto_ifconfig=YES                              # config all avail. interfaces
diff -r b8f3643c06cd -r dc906681a38d etc/rc.d/pf
--- a/etc/rc.d/pf       Sun Aug 07 00:53:13 2005 +0000
+++ b/etc/rc.d/pf       Sun Aug 07 01:03:39 2005 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: pf,v 1.3 2005/03/15 18:22:03 peter Exp $
+# $NetBSD: pf,v 1.4 2005/08/07 01:03:39 peter Exp $
 #
 
 # PROVIDE: pf
@@ -21,10 +21,10 @@
 {
        echo "Enabling pf firewall."
        /sbin/pfctl -q -e 
-       if [ -f /etc/pf.conf ]; then
-               /sbin/pfctl -q -f /etc/pf.conf
+       if [ -f ${pf_rules} ]; then
+               /sbin/pfctl -q -f ${pf_rules}
        else
-               warn "pf.conf not found; no pf rules loaded."
+               warn "${pf_rules} not found; no pf rules loaded."
        fi
 }
 
@@ -37,10 +37,10 @@
 pf_reload()
 {
        echo "Reloading pf rules."
-       if [ -f /etc/pf.conf ]; then
-               /sbin/pfctl -q -f /etc/pf.conf
+       if [ -f ${pf_rules} ]; then
+               /sbin/pfctl -q -f ${pf_rules}
        else
-               warn "pf.conf not found; no pf rules loaded."
+               warn "${pf_rules} not found; no pf rules loaded."
        fi
 }
 



Home | Main Index | Thread Index | Old Index