2 # $FreeBSD: src/release/picobsd/mfs_tree/etc/rc.network,v 1.1.2.3 2002/03/08 12:34:57 luigi Exp $
3 # $DragonFly: src/release/picobsd/mfs_tree/etc/Attic/rc.network,v 1.2 2003/06/17 04:27:20 dillon Exp $
6 echo -n 'Doing initial network setup:'
7 # Set the host name if it is not already set
8 if [ -z "`hostname -s`" ] ; then
12 # Set up all the network interfaces, calling startup scripts if needed
13 for ifn in ${network_interfaces}; do
14 [ -e /etc/start_if.${ifn} ] && . /etc/start_if.${ifn}
15 # Do the primary ifconfig if specified
16 eval ifconfig_args=\$ifconfig_${ifn}
17 [ -n "${ifconfig_args}" ] && ifconfig ${ifn} ${ifconfig_args}
18 # Check to see if aliases need to be added
22 eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
23 if [ -n "${ifconfig_args}" ]; then
24 ifconfig ${ifn} ${ifconfig_args} alias
25 alias=$((${alias} + 1))
32 # Load the filters if required
33 if [ -f /etc/rc.firewall -a "${firewall_enable}" = "YES" ] ; then
34 # Set quiet mode if requested
35 if [ "${firewall_quiet}" = "YES" ]; then
40 $fwcmd -f flush # Flush out the list before we begin.
43 echo "Firewall rules loaded."
45 echo "Warning: kernel has firewall functionality, but firewall rules weren't loaded."
46 echo " All ip services are ENABLED by default."
49 if [ "x$defaultrouter" != "xNO" ] ; then
50 static_routes="default ${static_routes}"
51 route_default="default ${defaultrouter}"
53 # Set up any static routes. This should be done before router discovery.
54 if [ "x${static_routes}" != "x" ]; then
55 for i in ${static_routes}; do
56 eval route_args=\$route_${i}
57 route add ${route_args}
60 echo -n 'Additional routing options:'
61 if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
62 echo -n ' tcp_extensions=NO'
63 sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1
64 sysctl -w net.inet.tcp.rfc1644=0 >/dev/null 2>&1
66 if [ "X$gateway_enable" = X"YES" ]; then
67 echo -n ' IP_gateway=YES'
68 sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1
70 if [ "X$arpproxy_all" = X"YES" ]; then
71 echo -n ' turning on ARP_PROXY_ALL: '
72 sysctl -w net.link.ether.inet.proxyall=1 2>&1
75 network_pass1_done=YES # Let future generations know we made it.
79 network_pass2_done=YES
83 network_pass3_done=YES