[kexec-tools/f19] Add support for bridge over bond/team/vlan.

Baoquan He baoquan at fedoraproject.org
Wed May 22 01:55:59 UTC 2013


commit de736673daaba91ae887694c9e4adf048f44dfc7
Author: WANG Chao <chaowang at redhat.com>
Date:   Mon Apr 8 18:02:21 2013 +0800

    Add support for bridge over bond/team/vlan.
    
    Kdump module doesn't check if bridge is stack on other complex interface
    and setup proper dracut cmdline. That makes dracut fail to setup a working
    network environment in 2nd kernel.
    
    This patch adds the ability to setup proper dracut cmdline for bridge over
    bond/team/vlan. Although in this timeframe, drauct only supports bridge over
    bond among these three complex network, it's worth fixing the other two types
    (bridge over team/vlan) along with. It would be much easier for us once
    the dracut part is done.
    
    Signed-off-by: WANG Chao <chaowang at redhat.com>
    Acked-by: Baoquan He <bhe at redhat.com>

 dracut-module-setup.sh |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index 4b0852a..2e48057 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -91,7 +91,15 @@ kdump_get_perm_addr() {
 kdump_setup_bridge() {
     local _netdev=$1
     for _dev in `ls /sys/class/net/$_netdev/brif/`; do
-        echo -n " ifname=$_dev:$(kdump_get_mac_addr $_dev)" >> ${initdir}/etc/cmdline.d/41bridge.conf
+        if kdump_is_bond "$_dev"; then
+            kdump_setup_bond "$_dev"
+        elif kdump_is_team "$_dev"; then
+            kdump_setup_team "$_dev"
+        elif kdump_is_vlan "$_dev"; then
+            kdump_setup_vlan "$_dev"
+        else
+            echo -n " ifname=$_dev:$(kdump_get_mac_addr $_dev)" >> ${initdir}/etc/cmdline.d/41bridge.conf
+        fi
     done
     echo " bridge=$_netdev:$(cd /sys/class/net/$_netdev/brif/; echo * | sed -e 's/ /,/g')" >> ${initdir}/etc/cmdline.d/41bridge.conf
 }


More information about the scm-commits mailing list