Search
j0ke.net Open Build Service
>
Projects
>
GFS
>
sysconfig
> sysconfig_bonding_slave_down_trigger.fate-303388-1.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File sysconfig_bonding_slave_down_trigger.fate-303388-1.patch of Package sysconfig (Revision 1)
Currently displaying revision
1
,
show latest
--- scripts/functions +++ scripts/functions 2008/02/07 10:32:24 @@ -558,18 +558,20 @@ return 1 fi + ## trigger down vlan ifaces when underlying iface goes down if [ -d "$VLAN_PATH" ]; then DEP_VLANS=`cd "$VLAN_PATH" grep -lws "Device: *$BASE_IFACE" *` DEP_IFACES="$DEP_VLANS" fi - ## don't trigger down of bond interface when a slave goes down - #if [ -d "$BOND_PATH" ]; then - # DEP_BONDS=`cd "$BOND_PATH" - # grep -lws "Slave Interface: *$BASE_IFACE" *` - # DEP_IFACES="$DEP_IFACES${DEP_BONDS:+ $DEP_BONDS}" - #fi + ## trigger down bonding slaves when bonding goes down + if [ -d "$BOND_PATH" ]; then + DEP_BONDS=`cd "$BOND_PATH" + grep -s '^Slave Interface:' $BASE_IFACE | + while IFS=':' read text iface ; do echo -n "$iface" ; done` + DEP_IFACES="$DEP_IFACES${DEP_BONDS:+ $DEP_BONDS}" + fi if [ -z "$DEP_IFACES" ]; then return 1 --- scripts/network +++ scripts/network 2008/02/07 11:34:36 @@ -856,8 +856,13 @@ $FAKE ifdown-route noiface -o rc $MODE fi - for IFACE in ${INTERFACE:-$BRIDGE_IFACES $TUNNEL_IFACES $DIALUP_IFACES $VLAN_IFACES $BONDING_IFACES $PHYSICAL_IFACES $AVAILABLE_IFACES} ; do + DONE_IFACES="" + for IFACE in ${INTERFACE:-$BRIDGE_IFACES $TUNNEL_IFACES $DIALUP_IFACES $VLAN_IFACES $PHYSICAL_IFACES $BONDING_IFACES $AVAILABLE_IFACES} ; do test -d /sys/class/net/$IFACE || continue + for I in $DONE_IFACES ; do + test "x$I" = "x$IFACE" && continue 2 + done + # printf " %-9s " $IFACE $FAKE ifdown $CONFIG $IFACE -o rc $MODE RET=$? @@ -870,6 +875,7 @@ *) rc_status -v1 ;; esac + DONE_IFACES="$DONE_IFACES $IFACE" rc_reset done --- scripts/ifup +++ scripts/ifup 2008/02/07 14:04:37 @@ -437,7 +437,14 @@ for DI in $DEP_IFACES; do ifdown $DI -o $OPTIONS done + message "`printf " %-9s now going down itself" $INTERFACE`" + # check if iface is (still) avaliable + # [bonding master may go down itself + # while the last slave gets removed] + if ! is_iface_available $INTERFACE; then + exit $R_SUCCESS + fi fi ######################################################################