ia64/xen-unstable

changeset 8969:175ad739d8bc

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@us.ibm.com>
author emellor@leeni.uk.xensource.com
date Wed Feb 22 21:52:30 2006 +0100 (2006-02-22)
parents 697fac283c9e
children b5bb9920bf48
files tools/examples/vif-common.sh
line diff
     1.1 --- a/tools/examples/vif-common.sh	Wed Feb 22 19:11:23 2006 +0000
     1.2 +++ b/tools/examples/vif-common.sh	Wed Feb 22 21:52:30 2006 +0100
     1.3 @@ -125,7 +125,7 @@ function handle_iptable()
     1.4  #
     1.5  function ip_of()
     1.6  {
     1.7 -  ip addr show "$1" | awk "/^.*inet.*$1\$/{print \$2}" | sed 's,/.*,,'
     1.8 +  ip addr show "$1" | awk "/^.*inet.*$1\$/{print \$2}" | sed 's,/.*,,' | head -1
     1.9  }
    1.10  
    1.11