View | Details | Raw Unified | Return to bug 3696
Collapse All | Expand All

(-)net-scripts-0.3-zcip/sysconfig/network-scripts/ifup (-3 / +26 lines)
Lines 128-137 Link Here
128
	is_yes "$RECEIVEONLY" && RFLAG="-r"
128
	is_yes "$RECEIVEONLY" && RFLAG="-r"
129
129
130
	ifconfig "$DEVICE" down
130
	ifconfig "$DEVICE" down
131
	echo "Enslaving $DEVICE to $MASTER"
131
        ifconfig $MASTER up
132
	"$IFENSLAVE" $RFLAG "$MASTER" "$DEVICE"
132
 
133
        # Check, if master needs additional configuration. It is required
134
        # if it should be configured via DHCP but has no slaves yet.
135
        if fakeMAC "$MASTER" && ! ifconfig $MASTER | fgrep -q "inet addr"
136
        then
137
	    masterconf=yes
138
        fi
133
139
134
	exit 0
140
	echo "Enslaving $DEVICE to $MASTER"
141
        if "$IFENSLAVE" $RFLAG "$MASTER" "$DEVICE"; then
142
	    # Remove unneeded routes
143
            /sbin/route | awk "/$DEVICE\\$/ { print \\$1,\\$3 }" |
144
            while read net mask; do
145
		/sbin/route del -net $net netmask $mask dev $DEVICE
146
            done
147
        fi
148
 
149
        # If additional configuration of master is required,
150
        # continue with master configuration, assuming
151
        # configuration protocol dhcp, else exit
152
        if [ -n "$masterconf" ]; then
153
                DEVICE=$MASTER
154
                DYNCONFIG=true
155
        else
156
	    exit 0
157
	fi    
135
fi
158
fi
136
159
137
# Now, run the specific script for Wireless LAN interfaces
160
# Now, run the specific script for Wireless LAN interfaces
(-)net-scripts-0.3-zcip/sysconfig/network-scripts/network-functions (+6 lines)
Lines 109-111 Link Here
109
        fi
109
        fi
110
    fi
110
    fi
111
}
111
}
112
113
# This function reports if given device has fake (zero only) MAC address
114
fakeMAC() {
115
    test -z `ifconfig $1 | grep HWaddr | awk '{print $NF}' | tr -d ':0'`
116
}
117

Return to bug 3696