]> git.ipfire.org Git - ipfire-2.x.git/blame - src/rc.d/rc.network
Ein NTFS-Update fuer den Heiner :D
[ipfire-2.x.git] / src / rc.d / rc.network
CommitLineData
cd1a2927
MT
1#!/bin/sh
2#
3# $Id: rc.network,v 1.10.2.6 2005/07/11 18:38:02 franck78 Exp $
4#
5eval $(/usr/local/bin/readhash CONFIG_ROOT/ethernet/settings)
6
7echo "Setting up loopback"
8ifconfig lo localhost up
9
10echo "Loading MASQ helper modules"
11modprobe iptable_nat
12modprobe ip_conntrack
13modprobe ip_conntrack_ftp
14modprobe ip_nat_ftp
15modprobe ip_conntrack_h323
16modprobe ip_nat_h323
17modprobe ip_conntrack_irc
18modprobe ip_nat_irc
19modprobe ip_conntrack_mms
20modprobe ip_nat_mms
21modprobe ip_conntrack_pptp
22modprobe ip_nat_pptp
23modprobe ip_conntrack_proto_gre
24modprobe ip_nat_proto_gre
25modprobe ip_conntrack_quake3
26modprobe ip_nat_quake3
27
28# Remove possible leftover files
29rm -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
39for 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
61done
62
63if [ -d /proc/bus/pccard ]; then
64 echo "Initializing PCMCIA cardbus modems"
65 modprobe serial_cb
66fi
67
5fcb6d5a 68echo "Setting up IPFire firewall rules"
cd1a2927
MT
69/etc/rc.d/rc.firewall start
70echo "Setting up IP Accounting"
71/etc/rc.d/helper/writeipac.pl
72/usr/sbin/fetchipac -S
5fcb6d5a 73echo "Setting IPFire DMZ pinholes"
cd1a2927
MT
74/usr/local/bin/setdmzholes
75
76if [ "$BLUE_DEV" != "" ]; then
77 echo "Setting up wireless firewall rules"
78 /usr/local/bin/restartwireless
79fi
80
81echo "Bringing network up"
82. /etc/rc.d/rc.netaddress.up