From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amos Kong Subject: [PATCH] KVM-test: Drop the absolute path of brctl/ifconfig Date: Wed, 4 May 2011 14:10:07 +0800 Message-ID: <20110504061007.GB3966@t400> References: <1303184574.2088.4.camel@freedom> <20110504030117.16383.32625.stgit@t> <4DC0C3CE.8090109@gmail.com> <1304479397.9850.22.camel@freedom> Reply-To: Amos Kong Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: autotest@test.kernel.org, Asias He , kvm@vger.kernel.org To: Lucas Meneghel Rodrigues Return-path: Content-Disposition: inline In-Reply-To: <1304479397.9850.22.camel@freedom> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org 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(-) 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