diff mbox

[2/3] kvm tools: Add a script to setup tap device

Message ID 20110414043755.9279.35674.stgit@localhost6.localdomain6 (mailing list archive)
State New, archived
Headers show

Commit Message

Amos Jianjun Kong April 14, 2011, 4:37 a.m. UTC
# ./kvm-ifup-vbr0 $tap_name

Signed-off-by: Amos Kong <kongjianjun@gmail.com>
---
 tools/kvm/util/kvm-ifup-vbr0 |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
 create mode 100755 tools/kvm/util/kvm-ifup-vbr0


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tools/kvm/util/kvm-ifup-vbr0 b/tools/kvm/util/kvm-ifup-vbr0
new file mode 100755
index 0000000..a91c37f
--- /dev/null
+++ b/tools/kvm/util/kvm-ifup-vbr0
@@ -0,0 +1,6 @@ 
+#!/bin/sh
+switch=vbr0
+/sbin/ifconfig $1 0.0.0.0 up
+/usr/sbin/brctl addif ${switch} $1
+/usr/sbin/brctl setfd ${switch} 0
+/usr/sbin/brctl stp ${switch} off