[Pkg-xen-devel] Bug#437127: [Xen-devel] [PATCH] hotplug: fix ip_of for systems using peer-to-peer link

Tim Deegan tim at xen.org
Tue Jul 10 07:58:11 UTC 2012


At 17:14 -0600 on 09 Jul (1341854093), Ian Campbell wrote:
> diff -r 54384951de02 -r 1d33f934dd67 tools/hotplug/Linux/vif-common.sh
> --- a/tools/hotplug/Linux/vif-common.sh	Tue Jul 10 00:07:20 2012 +0100
> +++ b/tools/hotplug/Linux/vif-common.sh	Tue Jul 10 00:14:54 2012 +0100
> @@ -175,7 +175,7 @@ handle_iptable()
>  #
>  ip_of()
>  {
> -  ip addr show "$1" | awk "/^.*inet.*$1\$/{print \$2}" | sed -n '1 s,/.*,,p'
> +  ip -4 -o addr show primary dev eth0 | awk '$3 == "inet" {split($4,i,"/"); print i[1]; exit}'

s/eth0/"$1"/?

Tim.





More information about the Pkg-xen-devel mailing list