2 ########################################################################
3 # Begin $rc_base/init.d/network
5 # Description : Network Control Script
7 # Authors : Michael Tremer - m.s.tremer@googlemail.com
11 # Notes : Written for IPFire by its team
13 ########################################################################
17 .
/var
/ipfire
/ethernet
/settings
21 boot_mesg
"Loading MASQ helper modules"
24 modprobe ip_conntrack_ftp
26 modprobe ip_conntrack_h323
28 modprobe ip_conntrack_irc
30 modprobe ip_conntrack_mms
32 modprobe ip_conntrack_pptp
34 modprobe ip_conntrack_proto_gre
35 modprobe ip_nat_proto_gre
36 modprobe ip_conntrack_quake3
37 modprobe ip_nat_quake3
39 # Remove possible leftover files
40 rm -f CONFIG_ROOT
/red
/{active
,device
,dial-on-demand
,dns1
,dns2
,local-ipaddress
,remote-ipaddress
,resolv.conf
}
42 # This won't actually do anything unless a PCMCIA controller was
43 # detected at install time, because /etc/pcmcia.conf won't exist.
44 /etc
/rc.d
/rc.pcmcia start
45 # Now, just in case we found a PCMCIA USB controller, we'll need to reload
47 /usr
/local
/bin
/resetusb
49 # The 'for' loop force driver loading order
50 for NIC
in 0 1 2 3; do
52 if [ "$GREEN_DEV" == "$ETHX" ]; then
53 if [ "$GREEN_DRIVER" != "" ]; then
54 modprobe
$GREEN_DRIVER $GREEN_DRIVER_OPTIONS
58 if [ "$ORANGE_DEV" == "$ETHX" ]; then
59 if [ "$ORANGE_DRIVER" != "" ]; then
60 modprobe
$ORANGE_DRIVER $ORANGE_DRIVER_OPTIONS
64 if [ "$BLUE_DEV" == "$ETHX" ]; then
65 if [ "$BLUE_DRIVER" != "" ]; then
66 modprobe
$BLUE_DRIVER $BLUE_DRIVER_OPTIONS
70 if [ "$RED_DEV" == "$ETHX" ]; then
71 if [ "$RED_DRIVER" != "" ]; then
72 modprobe
$RED_DRIVER $RED_DRIVER_OPTIONS
78 if [ -d /proc
/bus
/pccard
]; then
79 boot_mesg
"Initializing PCMCIA cardbus modems"
84 boot_mesg
"Setting up IPFire firewall rules"
85 /etc
/rc.d
/rc.firewall start
87 boot_mesg
"Setting up IP Accounting"
88 /etc
/rc.d
/helper
/writeipac.pl
89 /usr
/sbin
/fetchipac
-S
91 boot_mesg
"Setting IPFire DMZ pinholes"
92 /usr
/local
/bin
/setdmzholes
95 if [ "$BLUE_DEV" != "" ]; then
96 boot_mesg
"Setting up wireless firewall rules"
97 /usr
/local
/bin
/restartwireless
101 boot_mesg
"Bringing network up..."
102 .
/etc
/rc.d
/rc.netaddress.up
117 echo "Usage: ${0} {start|stop|restart}"
122 # End /etc/rc.d/init.d/network