~vcs-imports/ipfire/ipfire-2.x

« back to all changes in this revision

Viewing changes to src/rc.d/rc.netaddress.up

  • Committer: ipfire
  • Date: 2006-02-15 21:15:54 UTC
  • Revision ID: git-v1:cd1a2927226c734d96478e12bb768256fb64a06a


git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@16 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# $Id: rc.netaddress.up,v 1.7.2.14 2005/07/07 20:11:58 franck78 Exp $
 
4
#
 
5
 
 
6
eval $(/usr/local/bin/readhash CONFIG_ROOT/ppp/settings)
 
7
eval $(/usr/local/bin/readhash CONFIG_ROOT/ethernet/settings)
 
8
 
 
9
if [ "$1" != "NOTGREEN" ]; then
 
10
        if [ "$GREEN_DEV" != "" ]; then
 
11
                ifconfig $GREEN_DEV $GREEN_ADDRESS netmask $GREEN_NETMASK broadcast $GREEN_BROADCAST up
 
12
        else
 
13
                echo "WARNING: No driver set for GREEN"
 
14
        fi
 
15
fi
 
16
 
 
17
if [ "$CONFIG_TYPE" = "1" -o "$CONFIG_TYPE" = "3" -o "$CONFIG_TYPE" = "5" -o "$CONFIG_TYPE" = "7" ]; then
 
18
        if [ "$ORANGE_DEV" != "" ]; then
 
19
                ifconfig $ORANGE_DEV $ORANGE_ADDRESS netmask $ORANGE_NETMASK broadcast $ORANGE_BROADCAST up
 
20
        fi
 
21
fi
 
22
 
 
23
if [ "$CONFIG_TYPE" = "4" -o "$CONFIG_TYPE" = "5" -o "$CONFIG_TYPE" = "6" -o "$CONFIG_TYPE" = "7" ]; then
 
24
        if [ "$BLUE_DEV" != "" ]; then
 
25
                ifconfig $BLUE_DEV $BLUE_ADDRESS netmask $BLUE_NETMASK broadcast $BLUE_BROADCAST up
 
26
        fi
 
27
fi
 
28
 
 
29
 
 
30
# If RED is ethernet then check furthur...
 
31
if [ "$CONFIG_TYPE" == "2" -o "$CONFIG_TYPE" == "3" -o "$CONFIG_TYPE" == "6" -o "$CONFIG_TYPE" == "7" ]; then
 
32
        # If we are DHCP or STATIC we have to start automatically
 
33
        if [ "$RED_TYPE" == "DHCP" -o "$RED_TYPE" == "STATIC" ]; then
 
34
                AUTOCONNECT="on"
 
35
        fi
 
36
fi
 
37
 
 
38
 
 
39
# Start DNSMASQ with defaults
 
40
if [ "$DOMAIN_NAME_GREEN" == "" ]; then
 
41
        /usr/sbin/dnsmasq -l /var/state/dhcp/dhcpd.leases
 
42
else 
 
43
        /usr/sbin/dnsmasq -l /var/state/dhcp/dhcpd.leases -s "$DOMAIN_NAME_GREEN"
 
44
fi
 
45
 
 
46
# Only when AUTOCONNECT is off, do we not bother dialing but start local dns server
 
47
if [ "$AUTOCONNECT" == "off" ]; then
 
48
        # Start VPN Connections         # bug 1177572 might be corrected because this
 
49
        # /usr/local/bin/ipsecctrl S    # call was done to much earlier (before RED start)
 
50
                                        # Presently commented because I'm not sure VPN is usefull without RED
 
51
        echo -n                         # bash do not like empty then ... else
 
52
 
 
53
else
 
54
        /etc/rc.d/rc.red start
 
55
fi