Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 - 1
#!/bin/sh
2
 
3
# Don't do anything if the network is stopped
4
if [ ! -f /var/lock/subsys/network ]; then
5
    exit 0
6
fi
7
if [ -f /dev/.in_sysinit ] ; then
8
    exit 0
9
fi
10
 
11
. /etc/sysconfig/network-scripts/network-functions
12
 
13
if [ "$INTERFACE" = "" ]; then
14
    exit 1
15
fi
16
 
17
case $ACTION in
18
add|register)
19
 
20
    case $INTERFACE in
21
	# interfaces that are brought up as a part of configuration
22
	ppp*|ippp*|isdn*|plip*|lo*|irda*|dummy*|ipsec*|tun*|tap*)
23
	    exit 0
24
	    ;;
25
	# interfaces that are registered then brought up
26
	*)
27
            if [ -e /proc/net/vlan/${INTERFACE} ]; then
28
                exit 0
29
            fi
30
	    export IN_HOTPLUG=1
31
	    if [ -x /sbin/ifup ]; then
32
	        addr=$(get_hwaddr ${INTERFACE})
33
		if [ -n "$addr" ]; then
34
			nconfig=$(get_config_by_hwaddr ${addr})
35
			[ -n "$nconfig" ] && INTERFACE=$nconfig
36
		fi
37
		exec /sbin/ifup $INTERFACE
38
	    fi
39
	    ;;
40
    esac
41
    ;;
42
 
43
remove|unregister)
44
    case $INTERFACE in
45
	# interfaces that are brought down as part of deconfiguration
46
	ppp*|ippp*|isdn*|plip*|lo*|irda*|dummy*|ipsec*|tun*|tap*)
47
	    exit 0
48
	    ;;
49
	*)
50
	    export IN_HOTPLUG=1
51
	    if [ -x /sbin/ifdown ]; then
52
		exec /sbin/ifdown $INTERFACE
53
	    fi
54
	    ;;
55
    esac
56
    ;;
57
 
58
*)
59
    exit 1 ;;
60
 
61
esac