1 |
#!/bin/bash |
#!/bin/bash |
2 |
# $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/network,v 1.14 2007-12-13 12:06:22 niro Exp $ |
# $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/network,v 1.16 2007-12-17 14:30:25 niro Exp $ |
3 |
|
|
4 |
#%rlevels: 0:k 1:k 2:k 3:s 4:s 5:s 6:k |
#%rlevels: 0:k 1:k 2:k 3:s 4:s 5:s 6:k |
5 |
#%start: 20 |
#%start: 20 |
277 |
fi |
fi |
278 |
|
|
279 |
# check the config |
# check the config |
280 |
if [[ -z ${BRIDGE_INTERFACE} ]] |
if [[ -z ${BRIDGE_INTERFACES} ]] |
281 |
then |
then |
282 |
echo "BRIDGE: no \$BRIDGE_INTERFACE given. Aborting setup." |
echo "BRIDGE: no \$BRIDGE_INTERFACES given. Aborting setup." |
283 |
return 1 |
return 1 |
284 |
fi |
fi |
285 |
|
|
295 |
brctl addif ${iface} ${bport} |
brctl addif ${iface} ${bport} |
296 |
done |
done |
297 |
# enable spanning-tree protocol |
# enable spanning-tree protocol |
298 |
case BRIDGE_STP in |
case ${BRIDGE_STP} in |
299 |
on|off) brctl stp ${iface} ${BRIDGE_STP} ;; |
on|off) brctl stp ${iface} ${BRIDGE_STP} ;; |
300 |
*) echo "BRIDGE: unkown value \$BRIDGE_STP='$BRIDGE_STP'."; return 1 ;; |
*) echo "BRIDGE: unkown value \$BRIDGE_STP='$BRIDGE_STP'."; return 1 ;; |
301 |
esac |
esac |