From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dustin Kirkland Subject: [PATCH] update qemu-ifup for modern ip route output Date: Thu, 17 Sep 2009 15:38:38 -0500 Message-ID: <1253219918.12314.35.camel@x200> Reply-To: kirkland@canonical.com Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-2VNRJcqk0Pw7t5qyQzQS" To: kvm@vger.kernel.org Return-path: 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 Sender: kvm-owner@vger.kernel.org List-ID: --=-2VNRJcqk0Pw7t5qyQzQS Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 =20 -switch=3D$(/sbin/ip route list | awk '/^default / { print $NF }') +switch=3D$(/sbin/ip route list | awk '/^default / { print $5 }') /sbin/ifconfig $1 0.0.0.0 up /usr/sbin/brctl addif ${switch} $1 --=20 1.6.3.3 --=-2VNRJcqk0Pw7t5qyQzQS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkqynk4ACgkQs7pNXIOmEZRiqgCgzGyX7DGrJG31uwBe8unFHK4h 734An3c3dy2YXsxmEhq7QTBuz1ayTgaV =B21q -----END PGP SIGNATURE----- --=-2VNRJcqk0Pw7t5qyQzQS--