FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 01-14-2008, 04:26 AM
 
Default cluster/rgmanager/src/resources apache.sh

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: fabbione@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=$'
'
- 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
 

Thread Tools




All times are GMT. The time now is 11:28 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org