From: Dustin Kirkland <kirkland@canonical.com>
To: kvm@vger.kernel.org
Subject: [PATCH] update qemu-ifup for modern ip route output
Date: Thu, 17 Sep 2009 15:38:38 -0500 [thread overview]
Message-ID: <1253219918.12314.35.camel@x200> (raw)
[-- Attachment #1: Type: text/plain, Size: 876 bytes --]
update qemu-ifup for modern ip route output
The output from the /sbin/ip utility has changed, adding two
more columns, which breaks the qemu-ifup script, as it was
depending on the last column being the interface name.
Change this from $NF to $5.
https://bugs.edge.launchpad.net/ubuntu/+source/qemu-kvm/+bug/430652
Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
---
kvm/scripts/qemu-ifup | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kvm/scripts/qemu-ifup b/kvm/scripts/qemu-ifup
index 3bf8801..284b176 100755
--- a/kvm/scripts/qemu-ifup
+++ b/kvm/scripts/qemu-ifup
@@ -1,5 +1,5 @@
#!/bin/sh
-switch=$(/sbin/ip route list | awk '/^default / { print $NF }')
+switch=$(/sbin/ip route list | awk '/^default / { print $5 }')
/sbin/ifconfig $1 0.0.0.0 up
/usr/sbin/brctl addif ${switch} $1
--
1.6.3.3
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next reply other threads:[~2009-09-17 20:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-17 20:38 Dustin Kirkland [this message]
2009-09-18 16:12 ` [PATCH] update qemu-ifup for modern ip route output Marcelo Tosatti
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=1253219918.12314.35.camel@x200 \
--to=kirkland@canonical.com \
--cc=kvm@vger.kernel.org \
/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