File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434 esac
3535done
3636
37+ isCifs () {
38+ mount | grep " type cifs" > /dev/null
39+ echo $?
40+ }
3741
3842# ping dns server
3943echo ================================================
6771
6872# check to see if we have the NFS volume mounted
6973echo ================================================
70- mount| grep -v sunrpc| grep -v rpc_pipefs| grep nfs 1> /dev/null 2>&1
74+ storage=" cifs"
75+ if [ $( isCifs) -ne 0 ] ;
76+ then
77+ storage=" nfs"
78+ fi
79+
80+ mount| grep -v sunrpc| grep -v rpc_pipefs| grep $storage 1> /dev/null 2>&1
7181if [ $? -eq 0 ]
7282then
73- echo " NFS is currently mounted"
83+ echo " $storage is currently mounted"
7484 # check for write access
75- for MOUNTPT in ` mount| grep -v sunrpc| grep -v rpc_pipefs| grep nfs | awk ' {print $3}' `
85+ for MOUNTPT in ` mount| grep -v sunrpc| grep -v rpc_pipefs| grep $storage | awk ' {print $3}' `
7686 do
7787 if [ $MOUNTPT != " /proc/xen" ] # mounted by xen
7888 then
96106 ping -c 2 $NFSSERVER
97107 if [ $? -eq 0 ]
98108 then
99- echo " Good: Can ping NFS server"
109+ echo " Good: Can ping $storage server"
100110 else
101- echo " WARNING: cannot ping NFS server"
111+ echo " WARNING: cannot ping $storage server"
102112 echo routing table follows
103113 route -n
104114 fi
You can’t perform that action at this time.
0 commit comments