2008-09-25 01:20:56 +02:00
|
|
|
Index: xen-3.3.1-testing/tools/examples/network-bridge
|
2008-05-24 00:00:43 +02:00
|
|
|
===================================================================
|
2008-09-25 01:20:56 +02:00
|
|
|
--- xen-3.3.1-testing.orig/tools/examples/network-bridge
|
|
|
|
+++ xen-3.3.1-testing/tools/examples/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}
|
|
|
|
if ! ifdown ${netdev}; then
|
2008-08-18 00:24:29 +02:00
|
|
|
@@ -313,6 +318,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
|
|
|
|
}
|
|
|
|
|