31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
Index: xen-3.4.1-testing/tools/hotplug/Linux/network-bridge
|
|
===================================================================
|
|
--- xen-3.4.1-testing.orig/tools/hotplug/Linux/network-bridge
|
|
+++ xen-3.4.1-testing/tools/hotplug/Linux/network-bridge
|
|
@@ -249,6 +249,11 @@ op_start () {
|
|
|
|
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}
|
|
# Remember slaves for bonding interface.
|
|
@@ -322,6 +327,13 @@ op_stop () {
|
|
ip link set ${pdev} name ${netdev}
|
|
do_ifup ${netdev}
|
|
|
|
+ # 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
|
|
}
|
|
|