Sort the list of HBAs so it appears numerically instead
of showing host10 before host2.

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 6e82e37..ee27fd8 100755
--- a/contrib/fcc.sh
+++ b/contrib/fcc.sh
@@ -430,7 +430,8 @@ then
 fi
 if [ -d "$fdir" ]
 then
-       all_hbas=`ls $fdir 2>/dev/null`
+       # sort the list of HBAs by the number after the 't' in "host9"
+       all_hbas=`ls $fdir 2>/dev/null | sort -n -tt -k2`
 fi
 hbas="$all_hbas"
 


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

Reply via email to