summaryrefslogtreecommitdiffstats
path: root/etc/rc.network
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-03-24 10:28:49 +0000
committerbrian <brian@FreeBSD.org>1999-03-24 10:28:49 +0000
commit983a0df3af18ce10e251dadf960738b40a34cf5f (patch)
treedd89c2a0848c36b0ed13552325e3eea6798ae1c2 /etc/rc.network
parent3dee7f9088223b8a055c44e0b1f0e8788957cb9c (diff)
downloadFreeBSD-src-983a0df3af18ce10e251dadf960738b40a34cf5f.zip
FreeBSD-src-983a0df3af18ce10e251dadf960738b40a34cf5f.tar.gz
Move natd from network_pass3 to network_pass1
Diffstat (limited to 'etc/rc.network')
-rw-r--r--etc/rc.network31
1 files changed, 15 insertions, 16 deletions
diff --git a/etc/rc.network b/etc/rc.network
index e54589f..12300c0 100644
--- a/etc/rc.network
+++ b/etc/rc.network
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.39 1999/01/13 17:32:37 joerg Exp $
+# $Id: rc.network,v 1.40 1999/03/11 16:17:24 jfitz Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -100,10 +100,21 @@ network_pass1() {
# Load the filters if required
if [ $firewall_in_kernel = 1 ]; then
- if [ -n "$firewall_enable" -a -f /etc/rc.firewall -a \
- "x$firewall_enable" = "xYES" ] ; then
+ if [ -f /etc/rc.firewall -a X"$firewall_enable" = X"YES" ]; then
. /etc/rc.firewall
- echo "Firewall rules loaded."
+ echo -n 'Firewall rules loaded, starting divert daemons: '
+
+ # Network Address Translation daemon
+ if [ X"${natd_enable}" = X"YES" -a -n "${natd_interface}" ]; then
+ if echo ${natd_interface} | \
+ grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then
+ natd_ifarg="-a ${natd_interface}"
+ else
+ natd_ifarg="-n ${natd_interface}"
+ fi
+ echo -n ' natd'; ${natd_program} ${natd_flags} ${natd_ifarg}
+ fi
+ echo '.'
else
IPFW_DEFAULT=`ipfw l 65535`
if [ "$IPFW_DEFAULT" = "65535 deny ip from any to any" ]; then
@@ -311,18 +322,6 @@ network_pass3() {
unset stash_flag
fi
- # Network Address Translation daemon
- if [ "X${natd_enable}" = X"YES" -a X"${natd_interface}" != X"" \
- -a X"${firewall_enable}" = X"YES" ]; then
- if echo ${natd_interface} | \
- grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then
- natd_ifarg="-a ${natd_interface}"
- else
- natd_ifarg="-n ${natd_interface}"
- fi
- echo -n ' natd'; natd ${natd_flags} ${natd_ifarg}
- fi
-
echo '.'
network_pass3_done=YES
}
OpenPOWER on IntegriCloud