/[baselayout]/branches/baselayout-1_12/net-scripts/net.modules.d/bonding
Gentoo

Diff of /branches/baselayout-1_12/net-scripts/net.modules.d/bonding

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1797 Revision 1798
51 ebegin "Adding slaves to ${iface}" 51 ebegin "Adding slaves to ${iface}"
52 eindent 52 eindent
53 einfo "${!slaves}" 53 einfo "${!slaves}"
54 54
55 # Check that our slaves exist 55 # Check that our slaves exist
56 for s in "${!slaves}" ; do 56 for s in ${!slaves} ; do
57 interface_exists "${s}" && continue 57 interface_exists "${s}" && continue
58 ewarn "interface ${s} does not exist" 58 ewarn "interface ${s} does not exist"
59 return 1 59 return 1
60 done 60 done
61 61
62 # Must force the slaves to a particular state before adding them 62 # Must force the slaves to a particular state before adding them
63 for s in "${!slaves}" ; do 63 for s in ${!slaves} ; do
64 interface_del_addresses "${s}" 64 interface_del_addresses "${s}"
65 interface_up "${s}" 65 interface_up "${s}"
66 done 66 done
67 67
68 # now force the master to up 68 # now force the master to up
69 interface_up "${iface}" 69 interface_up "${iface}"
70 70
71 # finally add in slaves 71 # finally add in slaves
72 eoutdent 72 eoutdent
73 /sbin/ifenslave "${iface}" "${!slaves}" >/dev/null 73 eval /sbin/ifenslave "${iface}" "${!slaves}" >/dev/null
74 eend $? 74 eend $?
75 75
76 return 0 #important 76 return 0 #important
77} 77}
78 78
93 # remove all slaves 93 # remove all slaves
94 ebegin "Removing slaves from ${iface}" 94 ebegin "Removing slaves from ${iface}"
95 eindent 95 eindent
96 einfo "${slaves}" 96 einfo "${slaves}"
97 eoutdent 97 eoutdent
98 /sbin/ifenslave -d "${iface}" ${slaves} &>${devnull} 98 /sbin/ifenslave -d "${iface}" ${slaves}
99 99
100 # reset all slaves 100 # reset all slaves
101 for s in ${slaves}; do 101 for s in ${slaves}; do
102 if interface_exists "${s}" ; then 102 if interface_exists "${s}" ; then
103 interface_del_addresses "${s}" 103 interface_del_addresses "${s}"

Legend:
Removed from v.1797  
changed lines
  Added in v.1798

  ViewVC Help
Powered by ViewVC 1.1.20