cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: lhh@sourceware.org <lhh@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/rgmanager/src/resources netfs.sh
Date: 3 Oct 2007 17:01:40 -0000	[thread overview]
Message-ID: <20071003170140.5077.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh at sourceware.org	2007-10-03 17:01:39

Modified files:
	rgmanager/src/resources: netfs.sh 

Log message:
	Merge netfs.sh from RHEL4 branch; adds cifs support to netfs.sh

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/netfs.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.4&r2=1.1.2.5

--- cluster/rgmanager/src/resources/netfs.sh	2007/05/21 15:56:47	1.1.2.4
+++ cluster/rgmanager/src/resources/netfs.sh	2007/10/03 17:01:39	1.1.2.5
@@ -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 @@
     <version>1.0</version>
 
     <longdesc lang="en">
-        This defines an NFS mount for use by cluster services.
+        This defines an NFS/CIFS mount for use by cluster services.
     </longdesc>
     <shortdesc lang="en">
-        Defines an NFS file system mount.
+        Defines an NFS/CIFS file system mount.
     </shortdesc>
 
     <parameters>
@@ -79,7 +79,7 @@
 
         <parameter name="host" required="1">
 	    <longdesc lang="en">
-	    	NFS Server IP address or hostname
+	    	Server IP address or hostname
 	    </longdesc>
             <shortdesc lang="en">
 	    	IP or Host
@@ -89,7 +89,7 @@
 
         <parameter name="export" required="1">
 	    <longdesc lang="en">
-	    	NFS Export directory name
+	    	NFS Export directory name or CIFS share
 	    </longdesc>
             <shortdesc lang="en">
 	    	Export
@@ -99,10 +99,10 @@
 
         <parameter name="fstype" required="0">
 	    <longdesc lang="en">
-	    	NFS File System type (nfs or nfs4)
+	    	File System type (nfs, nfs4 or cifs)
 	    </longdesc>
             <shortdesc lang="en">
-	    	NFS File System Type
+	    	File System Type
             </shortdesc>
 	    <content type="string"/>
         </parameter>
@@ -194,7 +194,7 @@
 verify_host()
 {
 	if [ -z "$OCF_RESKEY_host" ]; then
-	       ocf_log err "No server hostname or IP addess specified."
+	       ocf_log err "No server hostname or IP address specified."
 	       return 1
 	fi
 
@@ -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 "\



             reply	other threads:[~2007-10-03 17:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-03 17:01 lhh [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-12-04 22:02 [Cluster-devel] cluster/rgmanager/src/resources netfs.sh lhh
2007-11-14 18:49 lhh
2007-10-03 16:44 mgrac
2007-10-03 16:40 mgrac
2006-09-14 13:54 mgrac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071003170140.5077.qmail@sourceware.org \
    --to=lhh@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).