From patchwork Thu Apr 14 04:37:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amos Jianjun Kong X-Patchwork-Id: 706191 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3E4cXhG027911 for ; Thu, 14 Apr 2011 04:38:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752291Ab1DNEi1 (ORCPT ); Thu, 14 Apr 2011 00:38:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3765 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751156Ab1DNEiT (ORCPT ); Thu, 14 Apr 2011 00:38:19 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3E4bvK1032119 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 14 Apr 2011 00:37:57 -0400 Received: from localhost6.localdomain6 (unused-65-224.nay.redhat.com [10.66.65.224] (may be forged)) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p3E4btF2026848; Thu, 14 Apr 2011 00:37:56 -0400 Subject: [PATCH 2/3] kvm tools: Add a script to setup tap device To: kvm@vger.kernel.org From: Amos Kong Cc: penberg@kernel.org, asias.hejun@gmail.com, sirouni@gmail.com Date: Thu, 14 Apr 2011 12:37:55 +0800 Message-ID: <20110414043755.9279.35674.stgit@localhost6.localdomain6> In-Reply-To: <20110414043745.9279.89159.stgit@localhost6.localdomain6> References: <20110414043745.9279.89159.stgit@localhost6.localdomain6> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 14 Apr 2011 04:38:33 +0000 (UTC) # ./kvm-ifup-vbr0 $tap_name Signed-off-by: Amos Kong --- 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 --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