From 6f4335d9dfd684484f491c774c87a1b88c154fea Mon Sep 17 00:00:00 2001
From: grev <grev>
Date: Wed, 3 Dec 2008 18:37:17 +0000
Subject: [PATCH] b=17853 i=Adilger check_config fix for NETTYPE=ptl

---
 lustre/tests/test-framework.sh | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh
index 352bf7ed49..04eabd55f1 100644
--- a/lustre/tests/test-framework.sh
+++ b/lustre/tests/test-framework.sh
@@ -1052,13 +1052,18 @@ init_versions_vars () {
 
 check_config () {
     local mntpt=$1
-    
+    local myMGS_host=$mgs_HOST   
+    if [ "$NETTYPE" = "ptl" ]; then
+        myMGS_host=$(h2ptl $mgs_HOST | sed -e s/@ptl//) 
+    fi
+
     echo Checking config lustre mounted on $mntpt
     local mgshost=$(mount | grep " $mntpt " | awk -F@ '{print $1}')
     mgshost=$(echo $mgshost | awk -F: '{print $1}')
-    if [ "$mgshost" != "$mgs_HOST" ]; then
+
+    if [ "$mgshost" != "$myMGS_host" ]; then
         FAIL_ON_ERROR=true \
-            error "Bad config file: lustre is mounted with mgs $mgshost, but mgs_HOST=$mgs_HOST
+            error "Bad config file: lustre is mounted with mgs $mgshost, but mgs_HOST=$mgs_HOST, NETTYPE=$NETTYPE
                    Please use correct config or set mds_HOST correctly!"
     fi
 }
-- 
GitLab