From mboxrd@z Thu Jan 1 00:00:00 1970 From: mgrac@sourceware.org Date: 3 Oct 2007 16:40:07 -0000 Subject: [Cluster-devel] cluster/rgmanager/src/resources netfs.sh Message-ID: <20071003164007.25115.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: cluster Changes by: mgrac at sourceware.org 2007-10-03 16:40:07 Modified files: rgmanager/src/resources: netfs.sh Log message: Resolves: #250681 - mount samba share from netfs RA Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/netfs.sh.diff?cvsroot=cluster&r1=1.9&r2=1.10 --- cluster/rgmanager/src/resources/netfs.sh 2007/05/21 15:58:04 1.9 +++ cluster/rgmanager/src/resources/netfs.sh 2007/10/03 16:40:06 1.10 @@ -21,7 +21,7 @@ # # -# NFS file system mount/umount/etc. agent +# NFS/CIFS file system mount/umount/etc. agent # LC_ALL=C @@ -50,10 +50,10 @@ 1.0 - This defines an NFS mount for use by cluster services. + This defines an NFS/CIFS mount for use by cluster services. - Defines an NFS file system mount. + Defines an NFS/CIFS file system mount. @@ -79,7 +79,7 @@ - NFS Server IP address or hostname + Server IP address or hostname IP or Host @@ -89,7 +89,7 @@ - NFS Export directory name + NFS Export directory name or CIFS share Export @@ -99,10 +99,10 @@ - NFS File System type (nfs or nfs4) + File System type (nfs, nfs4 or cifs) - NFS File System Type + File System Type @@ -215,7 +215,7 @@ [ -z "$OCF_RESKEY_fstype" ] && return 0 case $OCF_RESKEY_fstype in - nfs|nfs4) + nfs|nfs4|cifs) return 0 ;; *) @@ -247,6 +247,9 @@ esac case $OCF_RESKEY_fstype in + cifs) + continue + ;; nfs|nfs4) case $o in # @@ -374,7 +377,6 @@ return $FAIL ;; esac - # # Get the device # @@ -432,7 +434,16 @@ # Mount the NFS export # ocf_log debug "mount $fstype_option $mount_options $fullpath $mp" - mount $fstype_option $mount_options $fullpath $mp + + case $OCF_RESKEY_fstype in + nfs|nfs4) + mount -t $OCF_RESKEY_fstype $mount_options $host:$exp $mp + ;; + cifs) + mount -t $OCF_RESKEY_fstype $mount_options //$host/$exp $mp + ;; + esac + ret_val=$? if [ $ret_val -ne 0 ]; then ocf_log err "\