[Lunar-commits] <lunar-tools> lnet: Fixed endless loop when there are no devices left to configure

Stefan Wold ratler at lunar-linux.org
Tue Oct 15 23:15:13 CEST 2013


commit 510bed04d38a96be8f6da7689d4e9e5735cbfaa7
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Tue, 15 Oct 2013 12:25:57 -0700
URL: https://github.com/lunar-linux/lunar-tools/commit/510bed04d38a96be8f6da7689d4e9e5735cbfaa7

lnet: Fixed endless loop when there are no devices left to configure
---
  prog/lnet | +5/-0     
  1 file changed, 5 insertions(+)

--- a/prog/lnet
+++ b/prog/lnet
@@ -451,6 +451,11 @@ EOF
         (( COUNTER++ ))
       done
 
+      if [ ${#LIST[@]} -eq 0 ]; then
+        msgbox "Network devices" "No network devices found or all network devices have already been configured."
+        return
+      fi
+
       PROMPT="Select an interface to configure"
       RESULT=`$DIALOG  --title "Setup network interface"       \
               --ok-label "Select"            \




More information about the Lunar-commits mailing list