diff mbox

[v2,1/2] KVM-test: Add qemu-ifup-atbr0

Message ID 20110504030117.16383.32625.stgit@t (mailing list archive)
State New, archived
Headers show

Commit Message

Amos Kong May 4, 2011, 3:01 a.m. UTC
'atbr0' is a private bridge.
This script is used to setup tap device.

Signed-off-by: Amos Kong <akong@redhat.com>
---
 client/tests/kvm/scripts/qemu-ifup-atbr0 |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
 create mode 100755 client/tests/kvm/scripts/qemu-ifup-atbr0


--
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

Comments

Asias He May 4, 2011, 3:11 a.m. UTC | #1
On 05/04/2011 11:01 AM, Amos Kong wrote:
> 'atbr0' is a private bridge.
> This script is used to setup tap device.
> 
> Signed-off-by: Amos Kong <akong@redhat.com>
> ---
>  client/tests/kvm/scripts/qemu-ifup-atbr0 |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
>  create mode 100755 client/tests/kvm/scripts/qemu-ifup-atbr0
> 
> diff --git a/client/tests/kvm/scripts/qemu-ifup-atbr0 b/client/tests/kvm/scripts/qemu-ifup-atbr0
> new file mode 100755
> index 0000000..82c7efa
> --- /dev/null
> +++ b/client/tests/kvm/scripts/qemu-ifup-atbr0
> @@ -0,0 +1,6 @@
> +#!/bin/sh
> +switch=atbr0
> +/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

brctl is not in /usr/sbin but /sbin in some systems, e.g. Debian.

	hj:~# which brctl
	/sbin/brctl

Does dropping this absolute path to brctl sound better?
Lucas Meneghel Rodrigues May 4, 2011, 3:23 a.m. UTC | #2
On Wed, 2011-05-04 at 11:11 +0800, Asias He wrote:
> On 05/04/2011 11:01 AM, Amos Kong wrote:
> > 'atbr0' is a private bridge.
> > This script is used to setup tap device.
> > 
> > Signed-off-by: Amos Kong <akong@redhat.com>
> > ---
> >  client/tests/kvm/scripts/qemu-ifup-atbr0 |    6 ++++++
> >  1 files changed, 6 insertions(+), 0 deletions(-)
> >  create mode 100755 client/tests/kvm/scripts/qemu-ifup-atbr0
> > 
> > diff --git a/client/tests/kvm/scripts/qemu-ifup-atbr0 b/client/tests/kvm/scripts/qemu-ifup-atbr0
> > new file mode 100755
> > index 0000000..82c7efa
> > --- /dev/null
> > +++ b/client/tests/kvm/scripts/qemu-ifup-atbr0
> > @@ -0,0 +1,6 @@
> > +#!/bin/sh
> > +switch=atbr0
> > +/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
> 
> brctl is not in /usr/sbin but /sbin in some systems, e.g. Debian.
> 
> 	hj:~# which brctl
> 	/sbin/brctl
> 
> Does dropping this absolute path to brctl sound better?

I was planning to revive Jason's patchset that replaced the qemu ifup
scripts altogether. If the scripts were to be kept, yes, dropping the
absolute path sound good.

Thanks!

--
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/client/tests/kvm/scripts/qemu-ifup-atbr0 b/client/tests/kvm/scripts/qemu-ifup-atbr0
new file mode 100755
index 0000000..82c7efa
--- /dev/null
+++ b/client/tests/kvm/scripts/qemu-ifup-atbr0
@@ -0,0 +1,6 @@ 
+#!/bin/sh
+switch=atbr0
+/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