From patchwork Thu Sep 17 20:38:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dustin Kirkland X-Patchwork-Id: 48374 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8HKck9F021105 for ; Thu, 17 Sep 2009 20:38:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753678AbZIQUij (ORCPT ); Thu, 17 Sep 2009 16:38:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753555AbZIQUij (ORCPT ); Thu, 17 Sep 2009 16:38:39 -0400 Received: from adelie.canonical.com ([91.189.90.139]:49331 "EHLO adelie.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753358AbZIQUij (ORCPT ); Thu, 17 Sep 2009 16:38:39 -0400 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1MoNkY-0005j5-3T for ; Thu, 17 Sep 2009 21:38:42 +0100 Received: from cpe-66-69-254-183.austin.res.rr.com ([66.69.254.183] helo=[192.168.1.144]) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1MoNkX-00026V-P3 for kvm@vger.kernel.org; Thu, 17 Sep 2009 21:38:42 +0100 Subject: [PATCH] update qemu-ifup for modern ip route output From: Dustin Kirkland Reply-To: kirkland@canonical.com To: kvm@vger.kernel.org Date: Thu, 17 Sep 2009 15:38:38 -0500 Message-Id: <1253219918.12314.35.camel@x200> Mime-Version: 1.0 X-Mailer: Evolution 2.27.92 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 --- 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