|
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 |