|
From: Serge L. <sma...@us...> - 2009-11-19 04:28:24
|
Update of /cvsroot/devil-linux/build/config/etc/init.d In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23980/config/etc/init.d Modified Files: network Log Message: - fixed bonding. Now it's possible to use DHCP for bond interfaces. "network stop" releases all the slaves. Index: network =================================================================== RCS file: /cvsroot/devil-linux/build/config/etc/init.d/network,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- network 18 Nov 2009 22:01:17 -0000 1.37 +++ network 19 Nov 2009 04:28:13 -0000 1.38 @@ -224,6 +224,13 @@ evaluate_retval fi + # + # Bonding + if [ "$BONDING_MASTER" = "yes" ]; then + ifconfig $DEVICE up + ifenslave $DEVICE $BONDING_SLAVES $BONDING_OPTS + fi + if [ "$DHCP" = "yes" ]; then # if this is a vlan interface we need to take special care for DHCPd # FIXME: only needed for dhcp server not client, right? @@ -251,12 +258,6 @@ done fi - if [ "$BONDING_MASTER" = "yes" ]; then - for i in "$BONDING_SLAVES"; do - ifenslave $DEVICE $i $BONDING_OPTS; let ret=$ret+$? - done - fi - # evaluate combined result test $ret -eq 0 evaluate_retval @@ -344,6 +345,11 @@ DEVICE="vlan$VLANID" fi + # Bonding + if [ "$BONDING_MASTER" = "yes" ]; then + ifenslave -d $DEVICE $BONDING_SLAVES + fi + [ "$DHCP" == yes ] && dhcp_client_stop echo -n "Stopping interface $DEVICE" |