Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-changelog

[Xen-changelog] Adding a second IP address onto eth0 causes the vif-* ho

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Adding a second IP address onto eth0 causes the vif-* hotplug scripts to
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 22 Feb 2006 21:56:06 +0000
Delivery-date: Wed, 22 Feb 2006 21:56:13 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 175ad739d8bc42a32fc293bc38057823038a0cc4
# Parent  697fac283c9e565b4c9697c70a5529d06a488df9
Adding a second IP address onto eth0 causes the vif-* hotplug scripts to
fail: ip_of() is returning a LIST of IP addresses, one per line.
The vif-scripts attempt to use the list where single addresses ought to
be, with predictable results. This patch changes ip_of() to return
the first address in the list, which seems to be the first one configured.

Signed-off-by: Jim Dykman <dykman@xxxxxxxxxx>

diff -r 697fac283c9e -r 175ad739d8bc tools/examples/vif-common.sh
--- a/tools/examples/vif-common.sh      Wed Feb 22 19:11:23 2006
+++ b/tools/examples/vif-common.sh      Wed Feb 22 20:52:30 2006
@@ -125,7 +125,7 @@
 #
 function ip_of()
 {
-  ip addr show "$1" | awk "/^.*inet.*$1\$/{print \$2}" | sed 's,/.*,,'
+  ip addr show "$1" | awk "/^.*inet.*$1\$/{print \$2}" | sed 's,/.*,,' | head 
-1
 }
 
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Adding a second IP address onto eth0 causes the vif-* hotplug scripts to, Xen patchbot -unstable <=