|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Fix ip_of to cope with interfaces with multiple addresse
# 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 <=
|
|
|
|
|