Darryl L. Pierce
2009-Jul-14 20:35 UTC
[Ovirt-devel] [PATCH node] Filters out all non-physical networking devices.
This patch will scan through the list of devices that have the net.80203
capability. It will then also ensure that only those which originate
from a physical device and are not logical devices are presented.
Resolves: rhbz#511369
Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
scripts/ovirt-config-networking | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/scripts/ovirt-config-networking b/scripts/ovirt-config-networking
index 6d23735..0de7529 100755
--- a/scripts/ovirt-config-networking
+++ b/scripts/ovirt-config-networking
@@ -375,7 +375,9 @@ function setup_menu
udi_list=$(hal-find-by-capability --capability net.80203)
if [ -n "$udi_list" ]; then
for d in $udi_list; do
- NICS="$NICS $(hal-get-property --udi "$d" --key
net.interface)"
+ if [[ ! "$(hal-get-property --udi $d --key
net.originating_device)" =~ computer ]]; then
+ NICS="$NICS $(hal-get-property --udi "$d" --key
net.interface)"
+ fi
done
fi
--
1.6.2.5
Darryl L. Pierce
2009-Jul-15 14:38 UTC
[Ovirt-devel] [PATCH node] Filters out all non-physical networking devices.
This patch will scan through the list of devices that have the net.80203
capability. It will then also ensure that only those which originate
from a physical device and are not logical devices are presented.
Resolves: rhbz#511369
Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
scripts/ovirt-config-networking | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/scripts/ovirt-config-networking b/scripts/ovirt-config-networking
index 6d23735..a040ee2 100755
--- a/scripts/ovirt-config-networking
+++ b/scripts/ovirt-config-networking
@@ -375,12 +375,14 @@ function setup_menu
udi_list=$(hal-find-by-capability --capability net.80203)
if [ -n "$udi_list" ]; then
for d in $udi_list; do
- NICS="$NICS $(hal-get-property --udi "$d" --key
net.interface)"
+ if [[ ! "$(hal-get-property --udi $d --key net.physical_device)"
=~ computer ]]; then
+ NICS="$NICS $(hal-get-property --udi "$d" --key
net.interface)"
+ fi
done
fi
# Add virtio NICs that were possibly not detected by hal
- NICS="$NICS $(ifconfig -a | awk '/Ethernet/ {print $1}' | grep
-v -E "^br|^bond|^vnet|^virbr" | xargs)"
+ NICS="$NICS $(ifconfig -a | awk '/Ethernet/ {print $1}' | grep
-v -E "^br|^bond|^vnet|^virbr|\." | xargs)"
NICS=$(echo $NICS | tr ' ' '\n' | sort -u | xargs)
PS3="Please select an interface or configuration option: "
--
1.6.2.5