[Pkg-xen-devel] Bug#437127: xen-utils-common: vif-common fails to identify ip address of ethernet device
Stefan Tomanek
stefan at pico.ruhr.de
Fri Aug 10 15:16:25 UTC 2007
Package: xen-utils-common
Version: 3.0.3-0-2
Severity: normal
On my systen, the script vif-common fails to retrieve the primary
IP address of my ethernet device, preventing a domU from starting.
I tracked this issue down to the file /etc/xen/script/vif-common.
The function ip_of uses the following shell code to extract the
address:
ip addr show "$1" | awk "/^.*inet.*$1\$/{print \$2}" | sed -n '1 s,/.*,,p'
This code however fails if no slash is present in the address, which
is the case in my configuration:
stefan at datenbruch:/etc/xen/scripts$ ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:16:17:90:b4:35 brd ff:ff:ff:ff:ff:ff
inet 88.198.12.XXX peer 88.198.12.XXX/32 brd 88.255.255.255 scope global eth0
[...]
I changed the line to:
ip addr show dev $1 | awk '/^ *inet / {print $2; exit}' | sed 's#/.*##'
This works fine for me. Hopefully this special case gets taken care of in future
releases.
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (990, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-xen-vserver-686
Locale: LANG=de_DE at euro, LC_CTYPE=de_DE at euro (charmap=ISO-8859-15)
Versions of packages xen-utils-common depends on:
ii lsb-base 3.1-23.1 Linux Standard Base 3.1 init scrip
ii udev 0.105-4 /dev/ and hotplug management daemo
xen-utils-common recommends no packages.
-- no debconf information
More information about the Pkg-xen-devel
mailing list