[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/rgmanager/src/resources apache.metadat ...



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	mgrac sourceware org	2006-09-20 08:07:04

Modified files:
	rgmanager/src/resources: apache.metadata apache.sh 

Log message:
	Adds possibility to add command line options to Apache RA. Names of variable in RA's metadata are changed to unify style.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/apache.metadata.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/apache.sh.diff?cvsroot=cluster&r1=1.3&r2=1.4

--- cluster/rgmanager/src/resources/apache.metadata	2006/08/31 15:01:10	1.1
+++ cluster/rgmanager/src/resources/apache.metadata	2006/09/20 08:07:04	1.2
@@ -20,7 +20,7 @@
 	    <content type="string"/>
         </parameter>
 
-        <parameter name="serverRoot">
+        <parameter name="server_root">
             <longdesc lang="en">
                 Define an alternate initial ServerRoot
             </longdesc>
@@ -30,7 +30,7 @@
 	    <content type="string" default="/etc/httpd"/>
         </parameter>
 
-        <parameter name="serverConfigFile">
+        <parameter name="config_file">
             <longdesc lang="en">
                 Define an alternate ServerConfigFile
             </longdesc>
@@ -40,6 +40,17 @@
             <content type="string" default="conf/httpd.conf"/>
         </parameter>
 
+	<parameter name="httpd_options">
+		<longdesc lang="en">
+			Other command-line options for httpd
+		</longdesc>
+		<shortdesc lang="en">
+			Other command-line options for httpd
+		</shortdesc>
+		<content type="string" />
+	</parameter>
+
+
         <parameter name="service_name" inherit="service%name">
             <longdesc lang="en">
 	    	Inherit the service name.  We need to know
--- cluster/rgmanager/src/resources/apache.sh	2006/09/18 13:48:07	1.3
+++ cluster/rgmanager/src/resources/apache.sh	2006/09/20 08:07:04	1.4
@@ -60,7 +60,7 @@
 		sed 's/^ServerRoot "\(.*\)"/\1/;s/^ServerRoot \(.*\)/\1/'`
 
 	if [ -z "$CFG_serverRoot" ]; then
-		CFG_serverRoot="$OCF_RESKEY_serverRoot"
+		CFG_serverRoot="$OCF_RESKEY_server_root"
 	fi
 
 	rm -f "$tmpFile"
@@ -70,10 +70,10 @@
 
 apache_serverConfigFile()
 {
-	if [[ "$OCF_RESKEY_serverConfigFile" =~ '^/' ]]; then
-		APACHE_serverConfigFile="$OCF_RESKEY_serverConfigFile"
+	if [[ "$OCF_RESKEY_config_file" =~ '^/' ]]; then
+		APACHE_serverConfigFile="$OCF_RESKEY_config_file"
 	else 
-		APACHE_serverConfigFile="$OCF_RESKEY_serverRoot/$OCF_RESKEY_serverConfigFile"
+		APACHE_serverConfigFile="$OCF_RESKEY_server_root/$OCF_RESKEY_config_file"
 	fi
 
 	return;
@@ -83,23 +83,23 @@
 {
 	clog_service_verify $CLOG_INIT 
 	
-	if [ -z "$OCF_RESKEY_serverRoot" ]; then
+	if [ -z "$OCF_RESKEY_server_root" ]; then
 		clog_service_verify $CLOG_FAILED "Invalid ServerRoot"
 		return $OCF_ERR_ARGS
 	fi
 
-	if [ ! -d "$OCF_RESKEY_serverRoot" ]; then
+	if [ ! -d "$OCF_RESKEY_server_root" ]; then
 		clog_service_verify $CLOG_FAILED "ServerRoot Directory Is Missing"
 		return $OCF_ERR_ARGS
 	fi
 
-	if [ -z "$OCF_RESKEY_serverConfigFile" ]; then
-		clog_check_file_exist $CLOG_FAILED_INVALID "$OCF_RESKEY_serverConfigFile"
+	if [ -z "$OCF_RESKEY_config_file" ]; then
+		clog_check_file_exist $CLOG_FAILED_INVALID "$OCF_RESKEY_config_file"
 		return $OCF_ERR_ARGS
 	fi
 
 	if [ ! -r "$APACHE_serverConfigFile" ]; then
-		clog_check_file_exist $CLOG_FAILED_NOT_READABLE "$APACHE_serverConfigFile"
+		clog_check_file_exist $CLOG_FAILED_NOT_READABLE "$APACHE_config_file"
 		return $OCF_ERR_ARGS
 	fi
 
@@ -112,15 +112,16 @@
 
 	"$APACHE_HTTPD" -t \
 		-D"$OCF_RESKEY_name" \
-		-d "$OCF_RESKEY_serverRoot" \
-		-f "$APACHE_serverConfigFile" &> /dev/null
+		-d "$OCF_RESKEY_server_root" \
+		-f "$APACHE_serverConfigFile" \
+		$OCF_RESKEY_httpd_options &> /dev/null
 		
 	if [ $? -ne 0 ]; then
-		clog_check_syntax $CLOG_FAILED "$APACHE_serverConfigFile"
+		clog_check_syntax $CLOG_FAILED "$APACHE_config_file"
 		return $OCF_ERR_GENERIC
 	fi
 
-	clog_check_syntax $CLOG_SUCCEED "$APACHE_serverConfigFile"
+	clog_check_syntax $CLOG_SUCCEED "$APACHE_config_file"
 
 	return 0
 }
@@ -209,8 +210,9 @@
 
 	"$APACHE_HTTPD" \
 		"-D$OCF_RESKEY_name" \
-		-d "$OCF_RESKEY_serverRoot" \
+		-d "$OCF_RESKEY_server_root" \
 		-f "$APACHE_genConfig" \
+		$OCF_RESKEY_httpd_options \
 		-k start
 
 	if [ $? -ne 0 ]; then


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]