From patchwork Wed May 4 06:10:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amos Kong X-Patchwork-Id: 752702 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p446AF3a024311 for ; Wed, 4 May 2011 06:10:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752560Ab1EDGKM (ORCPT ); Wed, 4 May 2011 02:10:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62941 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752195Ab1EDGKL (ORCPT ); Wed, 4 May 2011 02:10:11 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p446AAOA019878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 4 May 2011 02:10:10 -0400 Received: from localhost ([10.66.9.169]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p446A8iM013336; Wed, 4 May 2011 02:10:09 -0400 Date: Wed, 4 May 2011 14:10:07 +0800 From: Amos Kong To: Lucas Meneghel Rodrigues Cc: Asias He , autotest@test.kernel.org, kvm@vger.kernel.org Subject: [PATCH] KVM-test: Drop the absolute path of brctl/ifconfig Message-ID: <20110504061007.GB3966@t400> Reply-To: Amos Kong References: <1303184574.2088.4.camel@freedom> <20110504030117.16383.32625.stgit@t> <4DC0C3CE.8090109@gmail.com> <1304479397.9850.22.camel@freedom> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1304479397.9850.22.camel@freedom> User-Agent: Mutt/1.5.20 (2009-06-14) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 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 (demeter2.kernel.org [140.211.167.43]); Wed, 04 May 2011 06:10:15 +0000 (UTC) The absolute paths of brctl are not same in different distribution. Signed-off-by: Amos Kong --- client/tests/kvm/scripts/qemu-ifup | 12 ++++++------ client/tests/kvm/scripts/qemu-ifup-ipv6 | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) -- 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/client/tests/kvm/scripts/qemu-ifup b/client/tests/kvm/scripts/qemu-ifup index c4debf5..2f9c7fe 100755 --- a/client/tests/kvm/scripts/qemu-ifup +++ b/client/tests/kvm/scripts/qemu-ifup @@ -2,10 +2,10 @@ # The following expression selects the first bridge listed by 'brctl show'. # Modify it to suit your needs. -switch=$(/usr/sbin/brctl show | awk 'NR==2 { print $1 }') +switch=$(brctl show | awk 'NR==2 { print $1 }') -/bin/echo 1 > /proc/sys/net/ipv6/conf/${switch}/disable_ipv6 -/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 +echo 1 > /proc/sys/net/ipv6/conf/${switch}/disable_ipv6 +ifconfig $1 0.0.0.0 up +brctl addif ${switch} $1 +brctl setfd ${switch} 0 +brctl stp ${switch} off diff --git a/client/tests/kvm/scripts/qemu-ifup-ipv6 b/client/tests/kvm/scripts/qemu-ifup-ipv6 index d4b0592..a11c084 100755 --- a/client/tests/kvm/scripts/qemu-ifup-ipv6 +++ b/client/tests/kvm/scripts/qemu-ifup-ipv6 @@ -2,10 +2,10 @@ # The following expression selects the first bridge listed by 'brctl show'. # Modify it to suit your needs. -switch=$(/usr/sbin/brctl show | awk 'NR==2 { print $1 }') +switch=$(brctl show | awk 'NR==2 { print $1 }') -/bin/echo 0 > /proc/sys/net/ipv6/conf/${switch}/disable_ipv6 -/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 +echo 0 > /proc/sys/net/ipv6/conf/${switch}/disable_ipv6 +ifconfig $1 0.0.0.0 up +brctl addif ${switch} $1 +brctl setfd ${switch} 0 +brctl stp ${switch} off