LUNs were being printed with 10 before 9.
Sort numerically on the four colon-separated fields.

Signed-off-by: Joe Eykholt <[email protected]>
---
 contrib/fcc.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/contrib/fcc.sh b/contrib/fcc.sh
index 5ceb079..bb979ef 100755
--- a/contrib/fcc.sh
+++ b/contrib/fcc.sh
@@ -162,7 +162,8 @@ lun_list() {
 
        host=`echo $hba | sed -e 's/host//'`
 
-       local luns=`(cd $ddir && ls -d $host:*) 2>/dev/null`
+       local luns=`(cd $ddir &&
+                ls -d $host:* | sort -n -t: -k1 -k2 -k3 -k4) 2>/dev/null`
 
        if [ -z "$luns" ]
        then


_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to