From: fabbione@sourceware.org <fabbione@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/rgmanager/src/resources apache.sh
Date: 14 Jan 2008 05:26:21 -0000 [thread overview]
Message-ID: <20080114052621.1136.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: fabbione at sourceware.org 2008-01-14 05:26:21
Modified files:
rgmanager/src/resources: apache.sh
Log message:
Allow the resource to run on Debian/Ubuntu systems without manual patching,
by checking for the apache2 daemon if httpd is not available.
Replace =~ '^/' sintax with less bash dependent version.
Use grep -E instead of -P as perl regexp support is not built on all distros.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/apache.sh.diff?cvsroot=cluster&r1=1.10&r2=1.11
--- cluster/rgmanager/src/resources/apache.sh 2007/04/05 15:08:19 1.10
+++ cluster/rgmanager/src/resources/apache.sh 2008/01/14 05:26:21 1.11
@@ -32,7 +32,11 @@
. $(dirname $0)/utils/messages.sh
. $(dirname $0)/utils/ra-skelet.sh
-declare APACHE_HTTPD=/usr/sbin/httpd
+if [ -x /usr/sbin/httpd ]; then
+ declare APACHE_HTTPD=/usr/sbin/httpd
+elif [ -x /usr/sbin/apache2 ]; then
+ declare APACHE_HTTPD=/usr/sbin/apache2
+fi
declare APACHE_serverConfigFile
declare APACHE_pid_file="`generate_name_for_pid_file`"
declare APACHE_conf_dir="`generate_name_for_conf_dir`"
@@ -42,7 +46,7 @@
apache_serverConfigFile()
{
- if [[ "$OCF_RESKEY_config_file" =~ '^/' ]]; then
+ if $(echo $OCF_RESKEY_config_file | grep -q "^/"); then
APACHE_serverConfigFile="$OCF_RESKEY_config_file"
else
APACHE_serverConfigFile="$OCF_RESKEY_server_root/$OCF_RESKEY_config_file"
@@ -135,7 +139,7 @@
IFS_old="$IFS"
IFS=$'\n'
- for i in `"$APACHE_parseConfig" -D"$OCF_RESKEY_name" < "$originalConfigFile" | grep -P '(^Listen)|(^Port)' | grep -v ':'`; do
+ for i in `"$APACHE_parseConfig" -D"$OCF_RESKEY_name" < "$originalConfigFile" | grep -E '(^Listen)|(^Port)' | grep -v ':'`; do
port=`echo $i | sed 's/^Listen \(.*\)/\1/;s/^Port \(.*\)/\1/'`;
IFS=$' ';
for z in $ip_addresses; do
next reply other threads:[~2008-01-14 5:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-14 5:26 fabbione [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-09-20 8:50 [Cluster-devel] cluster/rgmanager/src/resources apache.sh 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=20080114052621.1136.qmail@sourceware.org \
--to=fabbione@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).