diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2011-12-12 18:12:35 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2011-12-12 19:20:39 -0800 |
commit | dd45506a40f3332cef96cc8ca7e258561a200ec0 (patch) | |
tree | a34b6a49cb0f03ab5af104ade3a130b406096cb2 | |
parent | 46b96eb80d972db7d9d27d9635191c42016d6d96 (diff) |
net/bonding: ensure slave interfaces are down before adding.
The old ifenslave binary forcibly set new slave interface to down before
adding into the kernel, as a way of show it's version to the kernel. We
need to duplicate this so that the kernel doesn't think it's an old
ifenslave version using the bonding setup interface.
X-Gentoo-Bug: 391881
X-Gentoo-Bug-URL: https://bugs.gentoo.org/391881
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Thanks-to: Yun Zheng Hu <hu@fox-it.com>
-rw-r--r-- | net/bonding.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/bonding.sh b/net/bonding.sh index 5ccd1f57..6a83a8c3 100644 --- a/net/bonding.sh +++ b/net/bonding.sh @@ -95,16 +95,22 @@ bonding_pre_start() _up # finally add in slaves + # things needed in the process, and if they are done by ifenslave, openrc, and/or the kernel. + # down new slave interface: ifenslave, openrc + # set mtu: ifenslave, kernel + # set slave MAC: ifenslave, kernel eoutdent if [ -d /sys/class/net ]; then sys_bonding_path=/sys/class/net/"${IFACE}"/bonding if [ -n "${primary}" ]; then + IFACE=$primary _down echo "+${primary}" >$sys_bonding_path/slaves echo "${primary}" >$sys_bonding_path/primary fi for s in ${slaves}; do [ "${s}" = "${primary}" ] && continue if ! grep -q ${s} $sys_bonding_path/slaves; then + IFACE=$s _down echo "+${s}" >$sys_bonding_path/slaves fi done |