5 echo -n 'Doing initial network setup:'
6 # Set the host name if it is not already set
7 if [ -z "`hostname -s`" ] ; then
11 # Set up all the network interfaces, calling startup scripts if needed
12 for ifn in ${network_interfaces}; do
13 [ -e /etc/start_if.${ifn} ] && . /etc/start_if.${ifn}
14 # Do the primary ifconfig if specified
15 eval ifconfig_args=\$ifconfig_${ifn}
16 [ -n "${ifconfig_args}" ] && ifconfig ${ifn} ${ifconfig_args}
17 # Check to see if aliases need to be added
21 eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
22 if [ -n "${ifconfig_args}" ]; then
23 ifconfig ${ifn} ${ifconfig_args} alias
24 alias=$((${alias} + 1))
31 # Load the filters if required
32 if [ -f /etc/rc.firewall -a "${firewall_enable}" = "YES" ] ; then
33 # Set quiet mode if requested
34 if [ "${firewall_quiet}" = "YES" ]; then
39 $fwcmd -f flush # Flush out the list before we begin.
42 echo "Firewall rules loaded."
44 echo "Warning: kernel has firewall functionality, but firewall rules weren't loaded."
45 echo " All ip services are ENABLED by default."
48 if [ "x$defaultrouter" != "xNO" ] ; then
49 static_routes="default ${static_routes}"
50 route_default="default ${defaultrouter}"
52 # Set up any static routes. This should be done before router discovery.
53 if [ "x${static_routes}" != "x" ]; then
54 for i in ${static_routes}; do
55 eval route_args=\$route_${i}
56 route add ${route_args}
59 echo -n 'Additional routing options:'
60 if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
61 echo -n ' tcp_extensions=NO'
62 sysctl net.inet.tcp.rfc1323=0 >/dev/null 2>&1
63 sysctl net.inet.tcp.rfc1644=0 >/dev/null 2>&1
65 if [ "X$gateway_enable" = X"YES" ]; then
66 echo -n ' IP_gateway=YES'
67 sysctl net.inet.ip.forwarding=1 >/dev/null 2>&1
69 if [ "X$arpproxy_all" = X"YES" ]; then
70 echo -n ' turning on ARP_PROXY_ALL: '
71 sysctl net.link.ether.inet.proxyall=1 2>&1
74 network_pass1_done=YES # Let future generations know we made it.
78 network_pass2_done=YES
82 network_pass3_done=YES