]> git.ipfire.org Git - ipfire-2.x.git/blob - src/rc.d/rc.network
git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@16 ea5c0bd1-69bd-2848...
[ipfire-2.x.git] / src / rc.d / rc.network
1 #!/bin/sh
2 #
3 # $Id: rc.network,v 1.10.2.6 2005/07/11 18:38:02 franck78 Exp $
4 #
5 eval $(/usr/local/bin/readhash CONFIG_ROOT/ethernet/settings)
6
7 echo "Setting up loopback"
8 ifconfig lo localhost up
9
10 echo "Loading MASQ helper modules"
11 modprobe iptable_nat
12 modprobe ip_conntrack
13 modprobe ip_conntrack_ftp
14 modprobe ip_nat_ftp
15 modprobe ip_conntrack_h323
16 modprobe ip_nat_h323
17 modprobe ip_conntrack_irc
18 modprobe ip_nat_irc
19 modprobe ip_conntrack_mms
20 modprobe ip_nat_mms
21 modprobe ip_conntrack_pptp
22 modprobe ip_nat_pptp
23 modprobe ip_conntrack_proto_gre
24 modprobe ip_nat_proto_gre
25 modprobe ip_conntrack_quake3
26 modprobe ip_nat_quake3
27
28 # Remove possible leftover files
29 rm -f CONFIG_ROOT/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf}
30
31 # This won't actually do anything unless a PCMCIA controller was
32 # detected at install time, because /etc/pcmcia.conf won't exist.
33 /etc/rc.d/rc.pcmcia start
34 # Now, just in case we found a PCMCIA USB controller, we'll need to reload
35 # the USB here.
36 /usr/local/bin/resetusb
37
38 # The 'for' loop force driver loading order
39 for NIC in 0 1 2 3; do
40 ETHX="eth${NIC}"
41 if [ "$GREEN_DEV" == "$ETHX" ]; then
42 if [ "$GREEN_DRIVER" != "" ]; then
43 modprobe $GREEN_DRIVER $GREEN_DRIVER_OPTIONS
44 fi
45 fi
46 if [ "$ORANGE_DEV" == "$ETHX" ]; then
47 if [ "$ORANGE_DRIVER" != "" ]; then
48 modprobe $ORANGE_DRIVER $ORANGE_DRIVER_OPTIONS
49 fi
50 fi
51 if [ "$BLUE_DEV" == "$ETHX" ]; then
52 if [ "$BLUE_DRIVER" != "" ]; then
53 modprobe $BLUE_DRIVER $BLUE_DRIVER_OPTIONS
54 fi
55 fi
56 if [ "$RED_DEV" == "$ETHX" ]; then
57 if [ "$RED_DRIVER" != "" ]; then
58 modprobe $RED_DRIVER $RED_DRIVER_OPTIONS
59 fi
60 fi
61 done
62
63 if [ -d /proc/bus/pccard ]; then
64 echo "Initializing PCMCIA cardbus modems"
65 modprobe serial_cb
66 fi
67
68 echo "Setting up IPCOP firewall rules"
69 /etc/rc.d/rc.firewall start
70 echo "Setting up IP Accounting"
71 /etc/rc.d/helper/writeipac.pl
72 /usr/sbin/fetchipac -S
73 echo "Setting IPCOP DMZ pinholes"
74 /usr/local/bin/setdmzholes
75
76 if [ "$BLUE_DEV" != "" ]; then
77 echo "Setting up wireless firewall rules"
78 /usr/local/bin/restartwireless
79 fi
80
81 echo "Bringing network up"
82 . /etc/rc.d/rc.netaddress.up