public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Amos Kong <akong@redhat.com>
To: Lucas Meneghel Rodrigues <lmr@redhat.com>
Cc: autotest@test.kernel.org, Asias He <asias.hejun@gmail.com>,
	kvm@vger.kernel.org
Subject: [PATCH] KVM-test: Drop the absolute path of brctl/ifconfig
Date: Wed, 4 May 2011 14:10:07 +0800	[thread overview]
Message-ID: <20110504061007.GB3966@t400> (raw)
In-Reply-To: <1304479397.9850.22.camel@freedom>


The absolute paths of brctl are not same in different
distribution.

Signed-off-by: Amos Kong <akong@redhat.com>
---
 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

  parent reply	other threads:[~2011-05-04  6:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1303184574.2088.4.camel@freedom>
2011-05-04  3:01 ` [PATCH v2 1/2] KVM-test: Add qemu-ifup-atbr0 Amos Kong
2011-05-04  3:11   ` Asias He
2011-05-04  3:23     ` Lucas Meneghel Rodrigues
2011-05-04  6:08       ` [PATCH v3 " Amos Kong
2011-05-04  6:10       ` Amos Kong [this message]
2011-05-04  3:01 ` [PATCH v2 2/2] KVM-test: Setup private bridge in framework Amos Kong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110504061007.GB3966@t400 \
    --to=akong@redhat.com \
    --cc=asias.hejun@gmail.com \
    --cc=autotest@test.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=lmr@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox