2010-01-16 01:12:54 +01:00
|
|
|
Index: xen-3.5.0-testing/tools/hotplug/Linux/network-bridge
|
2008-05-24 00:00:43 +02:00
|
|
|
===================================================================
|
2010-01-16 01:12:54 +01:00
|
|
|
--- xen-3.5.0-testing.orig/tools/hotplug/Linux/network-bridge
|
|
|
|
+++ xen-3.5.0-testing/tools/hotplug/Linux/network-bridge
|
2008-08-18 00:24:29 +02:00
|
|
|
@@ -249,6 +249,11 @@ op_start () {
|
2008-04-12 21:41:18 +02:00
|
|
|
|
|
|
|
create_bridge ${tdev}
|
|
|
|
|
2010-01-16 01:12:54 +01:00
|
|
|
+ # Record creation of bridge in /dev/.sysconfig/network/xenbridges so other
|
2008-04-12 21:41:18 +02:00
|
|
|
+ # tools, e.g. yast2 lan, know that Xen bridging is active.
|
2010-01-16 01:12:54 +01:00
|
|
|
+ [ -d /dev/.sysconfig/network/xenbridges ] || mkdir /dev/.sysconfig/network/xenbridges
|
|
|
|
+ touch /dev/.sysconfig/network/xenbridges/${bridge}
|
2008-04-12 21:41:18 +02:00
|
|
|
+
|
|
|
|
preiftransfer ${netdev}
|
|
|
|
transfer_addrs ${netdev} ${tdev}
|
2009-05-04 18:38:09 +02:00
|
|
|
# Remember slaves for bonding interface.
|
|
|
|
@@ -322,6 +327,13 @@ op_stop () {
|
2008-05-24 00:00:43 +02:00
|
|
|
ip link set ${pdev} name ${netdev}
|
|
|
|
do_ifup ${netdev}
|
2008-04-12 21:41:18 +02:00
|
|
|
|
2010-01-16 01:12:54 +01:00
|
|
|
+ # Remove record of bridge from /dev/.sysconfig/network/xenbridges ...
|
|
|
|
+ rm -f /dev/.sysconfig/network/xenbridges/${bridge}
|
2008-04-12 21:41:18 +02:00
|
|
|
+ # ... and directory itself if empty
|
2010-01-16 01:12:54 +01:00
|
|
|
+ if [ -z "$(ls -A /dev/.sysconfig/network/xenbridges 2>/dev/null)" ]; then
|
|
|
|
+ rmdir /dev/.sysconfig/network/xenbridges
|
2008-04-12 21:41:18 +02:00
|
|
|
+ fi
|
|
|
|
+
|
|
|
|
for vlan in $vlans ; do ifup $vlan ; done
|
|
|
|
}
|
|
|
|
|