Perry Myers
2009-Jan-20 21:56 UTC
[Ovirt-devel] [PATCH node] Add support for finding virtio interfaces that may not have been detected by hal
Signed-off-by: Perry Myers <pmyers at redhat.com>
---
scripts/ovirt-config-networking | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/scripts/ovirt-config-networking b/scripts/ovirt-config-networking
index 9ede511..3ad8ee3 100755
--- a/scripts/ovirt-config-networking
+++ b/scripts/ovirt-config-networking
@@ -199,14 +199,17 @@ function configure_dns
function setup_menu
{
+ NICS=""
udi_list=$(hal-find-by-capability --capability net.80203)
- if [ -z "$udi_list" ]; then
- warn "ERROR: no usable network devices were found"
- exit 1
+ if [ -n "$udi_list" ]; then
+ for d in $udi_list; do
+ NICS="$NICS $(hal-get-property --udi "$d" --key
net.interface)"
+ done
fi
- NICS=""
- for d in $udi_list; do NICS="$NICS $(hal-get-property --udi
"$d" --key net.interface)"; done
+ # Add virtio NICs that were possibly not detected by hal
+ NICS="$NICS $(ifconfig -a | awk '/Ethernet/ {print $1}' |
xargs)"
+ NICS=$(echo $NICS | tr ' ' '\n' | sort -u | xargs)
PS3="Please select an interface or configuration option: "
}
--
1.6.0.6
Alan Pevec
2009-Jan-20 22:30 UTC
[Ovirt-devel] [PATCH node] Add support for finding virtio interfaces that may not have been detected by hal
ack as a temp. workaround -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20090120/6361ddb8/attachment.htm>