2009-08-01 11:53:46 +02:00
|
|
|
Index: xen-3.4.1-testing/tools/hotplug/Linux/network-bridge
|
2008-05-24 00:00:43 +02:00
|
|
|
===================================================================
|
2009-08-01 11:53:46 +02:00
|
|
|
--- xen-3.4.1-testing.orig/tools/hotplug/Linux/network-bridge
|
|
|
|
+++ xen-3.4.1-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}
|
|
|
|
|
|
|
|
+ # Record creation of bridge in /dev/shm/sysconfig/xenbridges so other
|
|
|
|
+ # tools, e.g. yast2 lan, know that Xen bridging is active.
|
|
|
|
+ [ -d /dev/shm/sysconfig/xenbridges ] || mkdir /dev/shm/sysconfig/xenbridges
|
|
|
|
+ touch /dev/shm/sysconfig/xenbridges/${bridge}
|
|
|
|
+
|
|
|
|
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
|
|
|
|
|
|
|
+ # Remove record of bridge from /dev/shm/sysconfig/xenbridges ...
|
|
|
|
+ rm -f /dev/shm/sysconfig/xenbridges/${bridge}
|
|
|
|
+ # ... and directory itself if empty
|
|
|
|
+ if [ -z "$(ls -A /dev/shm/sysconfig/xenbridges 2>/dev/null)" ]; then
|
|
|
|
+ rmdir /dev/shm/sysconfig/xenbridges
|
|
|
|
+ fi
|
|
|
|
+
|
|
|
|
for vlan in $vlans ; do ifup $vlan ; done
|
|
|
|
}
|
|
|
|
|