WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Fix ip_of to cope with interfaces with multiple addresse

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix ip_of to cope with interfaces with multiple addresses, courtesy of
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 09 Dec 2005 14:44:09 +0000
Delivery-date: Fri, 09 Dec 2005 14:47:19 +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 e64e28e36e02ddcef1e5f0d398f649e2d869302e
# Parent  c9772105fead52abf64213aa1eda6419871acf94
Fix ip_of to cope with interfaces with multiple addresses, courtesy of
Adam Heath <doogie@xxxxxxxxxxxxx>.
 
Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r c9772105fead -r e64e28e36e02 tools/examples/vif-common.sh
--- a/tools/examples/vif-common.sh      Thu Dec  8 15:04:41 2005
+++ b/tools/examples/vif-common.sh      Thu Dec  8 15:54:35 2005
@@ -113,7 +113,7 @@
 #
 function ip_of()
 {
-  ip addr show "$1" | sed -n 's/^.*inet \([0-9.]*\).*$/\1/p'
+  ip addr show "$1" | awk "/^.*inet.*$1\$/{print \$2}" | sed 's,/.*,,'
 }
 
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix ip_of to cope with interfaces with multiple addresses, courtesy of, Xen patchbot -unstable <=