30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
diff -ru a/tools/examples/network-bridge b/tools/examples/network-bridge
|
|
--- a/tools/examples/network-bridge 2008-04-02 12:33:07.000000000 -0600
|
|
+++ b/tools/examples/network-bridge 2008-04-02 15:04:59.000000000 -0600
|
|
@@ -238,6 +238,11 @@
|
|
|
|
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
|
|
@@ -302,6 +307,13 @@
|
|
|
|
brctl delbr ${tdev}
|
|
|
|
+ # 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
|
|
}
|
|
|