cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajeshbatt...@apache.org
Subject [3/7] git commit: updated refs/heads/4.3 to 58aaf67
Date Sun, 22 Dec 2013 16:58:58 GMT
CLOUDSTACK-5559 Add CIFS support in ssvm-check script


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/35d8b2f8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/35d8b2f8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/35d8b2f8

Branch: refs/heads/4.3
Commit: 35d8b2f88db78de2f2132327f9dd53c3f292ed34
Parents: b4c4f7c
Author: Rajesh Battala <rajesh.battala@citrix.com>
Authored: Thu Dec 19 17:42:37 2013 +0530
Committer: Rajesh Battala <rajesh.battala@citrix.com>
Committed: Sun Dec 22 20:24:15 2013 +0530

----------------------------------------------------------------------
 systemvm/scripts/ssvm-check.sh | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/35d8b2f8/systemvm/scripts/ssvm-check.sh
----------------------------------------------------------------------
diff --git a/systemvm/scripts/ssvm-check.sh b/systemvm/scripts/ssvm-check.sh
index 7b83c98..2ab51c5 100644
--- a/systemvm/scripts/ssvm-check.sh
+++ b/systemvm/scripts/ssvm-check.sh
@@ -34,6 +34,10 @@ do
    esac
 done
 
+isCifs() {
+ mount | grep "type cifs" > /dev/null
+ echo $?
+}
 
 # ping dns server
 echo ================================================
@@ -67,12 +71,18 @@ fi
 
 # check to see if we have the NFS volume mounted
 echo ================================================
-mount|grep -v sunrpc|grep -v rpc_pipefs|grep nfs 1> /dev/null 2>&1
+storage="cifs"
+if [ $(isCifs) -ne 0 ] ;
+ then
+   storage="nfs"
+fi
+
+mount|grep -v sunrpc|grep -v rpc_pipefs|grep $storage 1> /dev/null 2>&1
 if [ $? -eq 0 ]
 then
-    echo "NFS is currently mounted"
+    echo "$storage is currently mounted"
     # check for write access
-    for MOUNTPT in `mount|grep -v sunrpc|grep -v rpc_pipefs|grep nfs| awk '{print $3}'`
+    for MOUNTPT in `mount|grep -v sunrpc|grep -v rpc_pipefs|grep $storage| awk '{print $3}'`
     do
         if [ $MOUNTPT != "/proc/xen" ] # mounted by xen
         then
@@ -96,9 +106,9 @@ else
     ping -c 2  $NFSSERVER
     if [ $? -eq 0 ]
     then
-	echo "Good: Can ping NFS server"
+	echo "Good: Can ping $storage server"
     else
-	echo "WARNING: cannot ping NFS server"
+	echo "WARNING: cannot ping $storage server"
 	echo routing table follows
 	route -n
     fi


Mime
View raw message