ia64/xen-unstable

changeset 8302:e64e28e36e02

Fix ip_of to cope with interfaces with multiple addresses, courtesy of
Adam Heath <doogie@brainfood.com>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Thu Dec 08 15:54:35 2005 +0000 (2005-12-08)
parents c9772105fead
children 52f214d983fb
files tools/examples/vif-common.sh
line diff
     1.1 --- a/tools/examples/vif-common.sh	Thu Dec 08 15:04:41 2005 +0000
     1.2 +++ b/tools/examples/vif-common.sh	Thu Dec 08 15:54:35 2005 +0000
     1.3 @@ -113,7 +113,7 @@ function handle_iptable()
     1.4  #
     1.5  function ip_of()
     1.6  {
     1.7 -  ip addr show "$1" | sed -n 's/^.*inet \([0-9.]*\).*$/\1/p'
     1.8 +  ip addr show "$1" | awk "/^.*inet.*$1\$/{print \$2}" | sed 's,/.*,,'
     1.9  }
    1.10  
    1.11