cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: mgrac@sourceware.org <mgrac@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/rgmanager/src/resources apache.metadat ...
Date: 20 Sep 2006 08:07:05 -0000	[thread overview]
Message-ID: <20060920080705.31689.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	mgrac at 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



             reply	other threads:[~2006-09-20  8:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-20  8:07 mgrac [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-09-29 10:44 [Cluster-devel] cluster/rgmanager/src/resources apache.metadat mgrac
2006-10-10 13:57 mgrac
2007-04-05 15:08 lhh
2007-04-23 13:07 ` Simone Gotti
2007-04-27 17:56   ` Lon Hohberger

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=20060920080705.31689.qmail@sourceware.org \
    --to=mgrac@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).