netoptions (27218) | netoptions (29300) |
---|---|
1#!/bin/sh - 2# | 1#!/bin/sh - 2# |
3# $Id: rc.network,v 1.8 1997/05/19 07:46:48 jkh Exp $ | 3# $Id: rc.network,v 1.9 1997/07/06 00:33:34 pst Exp $ |
4# From: @(#)netstart 5.9 (Berkeley) 3/30/91 5 6# Note that almost all the user-configurable behavior is no longer in 7# this file, but rather in /etc/rc.conf. Please check that file 8# first before contemplating any changes here. If you do need to change 9# this file for some reason, we would like to know about it. 10 11# First pass startup stuff. --- 37 unchanged lines hidden (view full) --- 49 done 50 # Do ipx address if specified 51 eval ifconfig_args=\$ifconfig_${ifn}_ipx 52 if [ -n "${ifconfig_args}" ]; then 53 ifconfig ${ifn} ${ifconfig_args} 54 fi 55 ifconfig ${ifn} 56 done | 4# From: @(#)netstart 5.9 (Berkeley) 3/30/91 5 6# Note that almost all the user-configurable behavior is no longer in 7# this file, but rather in /etc/rc.conf. Please check that file 8# first before contemplating any changes here. If you do need to change 9# this file for some reason, we would like to know about it. 10 11# First pass startup stuff. --- 37 unchanged lines hidden (view full) --- 49 done 50 # Do ipx address if specified 51 eval ifconfig_args=\$ifconfig_${ifn}_ipx 52 if [ -n "${ifconfig_args}" ]; then 53 ifconfig ${ifn} ${ifconfig_args} 54 fi 55 ifconfig ${ifn} 56 done |
57 58 # If IP filtering 59 if [ -n "$firewall" -a "x$firewall" != "xNO" -a -f /etc/rc.firewall ] ; then 60 echo -n ' firewall' | 57 58 # Initialize IP filtering using ipfw 59 echo "" 60 /sbin/ipfw -q flush > /dev/null 2>&1 61 if [ $? ] ; then 62 firewall_in_kernel=0 63 else 64 firewall_in_kernel=1 65 fi 66 67 if [ $firewall_in_kernel = 0 -a "x$firewall_enable" = "xYES" ] ; then 68 modload /lkm/ipfw_mod.o 69 if [ $? = 0 ]; then 70 firewall_in_kernel=1 # module loaded successfully 71 echo "Kernel firewall module loaded." 72 else 73 echo "Warning: firewall kernel module failed to load." 74 fi 75 fi 76 77 # Load the filters if required 78 if [ $firewall_in_kernel = 1 ]; then 79 if [ -n "$firewall_enable" -a -f /etc/rc.firewall -a \ 80 "x$firewall_enable" = "xYES" ] ; then |
61 . /etc/rc.firewall | 81 . /etc/rc.firewall |
82 echo "Firewall rules loaded." 83 else 84 echo "Warning: kernel has firewall functionality, but firewall rules are not enabled." 85 echo " All ip services are disabled." 86 fi |
|
62 fi 63 | 87 fi 88 |
89 # Configure routing 90 |
|
64 if [ "x$defaultrouter" != "xNO" ] ; then 65 static_routes="default ${static_routes}" 66 route_default="default ${defaultrouter}" 67 fi 68 69 # Set up any static routes. This should be done before router discovery. 70 if [ "x${static_routes}" != "x" ]; then 71 for i in ${static_routes}; do --- 138 unchanged lines hidden --- | 91 if [ "x$defaultrouter" != "xNO" ] ; then 92 static_routes="default ${static_routes}" 93 route_default="default ${defaultrouter}" 94 fi 95 96 # Set up any static routes. This should be done before router discovery. 97 if [ "x${static_routes}" != "x" ]; then 98 for i in ${static_routes}; do --- 138 unchanged lines hidden --- |