summaryrefslogtreecommitdiff
path: root/etc/rc
diff options
context:
space:
mode:
authorKjell Wooding <kjell@cvs.openbsd.org>2001-07-01 08:39:00 +0000
committerKjell Wooding <kjell@cvs.openbsd.org>2001-07-01 08:39:00 +0000
commit50a44088dcbe45123c2ff5c67a7ffeedebed0fa0 (patch)
tree4f349f24000f30e681e4da96885126ca01f4beab /etc/rc
parente32f8044d557930423869cc2b2523e30db658b2e (diff)
Initialization infrastruture for pf. Based on initial patches
by ian@, and much input and mangling from theo.
Diffstat (limited to 'etc/rc')
-rw-r--r--etc/rc15
1 files changed, 14 insertions, 1 deletions
diff --git a/etc/rc b/etc/rc
index a07f8e6fdc8..19c5c8ff4a3 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.175 2001/06/27 03:34:08 hin Exp $
+# $OpenBSD: rc,v 1.176 2001/07/01 08:38:59 kjell Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -113,6 +113,10 @@ rm -f /fastboot # XXX (root now writeable)
echo 'setting tty flags'
ttyflags -a
+if [ "X$pf" != X"NO" ]; then
+ echo "block in all\nblock out all" | pfctl -R - -e
+fi
+
if [ -f /etc/sysctl.conf ]; then
(
# delete comments and blank lines
@@ -128,6 +132,15 @@ fi
echo 'starting network'
. /etc/netstart
+if [ "X$pf" != X"NO" ]; then
+ if [ -f ${nat_rules} ]; then
+ pfctl -N ${nat_rules}
+ fi
+ if [ -f ${pf_rules} ]; then
+ pfctl -R ${pf_rules}
+ fi
+fi
+
mount /usr >/dev/null 2>&1
mount /var >/dev/null 2>&1