[Ovirt-devel] [PATCH node] add nic link status and blink identify option

Alan Pevec apevec at redhat.com
Wed May 27 14:39:48 UTC 2009


From: Joey Boggs <jboggs at redhat.com>

---
 scripts/ovirt-config-networking |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/scripts/ovirt-config-networking b/scripts/ovirt-config-networking
index 46f74da..143c985 100755
--- a/scripts/ovirt-config-networking
+++ b/scripts/ovirt-config-networking
@@ -52,6 +52,22 @@ function configure_interface
     if [ -z "$AUTO" ]; then
         while true; do
             printf "\n"
+            LINK=`ethtool $NIC| grep "Link detected"`:u
+            [ -z "$LINK" ] && return
+            if echo $LINK | grep -q "Link detected: yes" ; then
+                NICSTATUS="ACTIVE"
+            else
+                NICSTATUS="INACTIVE"
+            fi
+            echo "NIC is: $NICSTATUS"
+
+            read -ep "Help identify $NIC by blinking lights for 10 seconds ([Y]es/[N]o)?"
+            case $REPLY in
+                Y|y)
+                    ethtool --identify $NIC 10
+                    ;;
+            esac
+
             read -ep "Enable IPv4 support ([S]tatic IP, [D]HCP, [N]o or [A]bort)? "
             case $REPLY in
                 D|d)
-- 
1.6.0.6




More information about the ovirt-devel mailing list