[Cluster-devel] cluster/rgmanager/src/resources apache.metadat ...
mgrac at sourceware.org
mgrac at sourceware.org
Tue Oct 10 13:57:54 UTC 2006
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: mgrac at sourceware.org 2006-10-10 13:57:52
Added files:
rgmanager/src/resources: apache.metadata apache.sh
mysql.metadata mysql.sh
openldap.metadata openldap.sh
postgres-8.metadata postgres-8.sh
samba.metadata samba.sh
tomcat-5.metadata tomcat-5.sh
Log message:
Bug #204403. Resource agents for Apache, MySQL, OpenLDAP, Postgres 8, Samba and Tomcat 5.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/apache.metadata.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.3.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/apache.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.9.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/mysql.metadata.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.3.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/mysql.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.8.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/openldap.metadata.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/openldap.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.7.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/postgres-8.metadata.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/postgres-8.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.5.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/samba.metadata.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/samba.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.5.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/tomcat-5.metadata.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/tomcat-5.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
/cvs/cluster/cluster/rgmanager/src/resources/apache.metadata,v --> standard output
revision 1.3.2.1
--- cluster/rgmanager/src/resources/apache.metadata
+++ - 2006-10-10 13:57:53.100925000 +0000
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<resource-agent version="rgmanager 2.0" name="apache">
+ <version>1.0</version>
+
+ <longdesc lang="en">
+ This defines an instance of Apache web server
+ </longdesc>
+ <shortdesc lang="en">
+ Defines an Apache web server
+ </shortdesc>
+
+ <parameters>
+ <parameter name="name" primary="1">
+ <longdesc lang="en">
+ Define a name for use in <IfDefine name> directive.
+ </longdesc>
+ <shortdesc lang="en">
+ Name
+ </shortdesc>
+ <content type="string"/>
+ </parameter>
+
+ <parameter name="server_root">
+ <longdesc lang="en">
+ Define an alternate initial ServerRoot
+ </longdesc>
+ <shortdesc lang="en">
+ Initial ServerRoot
+ </shortdesc>
+ <content type="string" default="/etc/httpd"/>
+ </parameter>
+
+ <parameter name="config_file">
+ <longdesc lang="en">
+ Define an alternate ServerConfigFile
+ </longdesc>
+ <shortdesc lang="en">
+ Initial ServerConfigFile
+ </shortdesc>
+ <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="shutdown_wait">
+ <longdesc lang="en">
+ Wait X seconds for correct end of service shutdown
+ </longdesc>
+ <shortdesc lang="en">
+ Wait X seconds for correct end of service shutdown
+ </shortdesc>
+ <content type="number" />
+ </parameter>
+
+ <parameter name="service_name" inherit="service%name">
+ <longdesc lang="en">
+ Inherit the service name. We need to know
+ the service name in order to determine file
+ systems and IPs for this service.
+ </longdesc>
+ <shortdesc lang="en">
+ Inherit the service name.
+ </shortdesc>
+ <content type="string"/>
+ </parameter>
+
+ </parameters>
+
+ <actions>
+ <action name="start" timeout="0"/>
+ <action name="stop" timeout="0"/>
+
+ <!-- Checks to see if it''s mounted in the right place -->
+ <action name="status" interval="1m" timeout="10"/>
+ <action name="monitor" interval="1m" timeout="10"/>
+
+ <!-- Checks to see if we can read from the mountpoint -->
+ <action name="status" depth="10" timeout="30" interval="5m"/>
+ <action name="monitor" depth="10" timeout="30" interval="5m"/>
+
+ <action name="meta-data" timeout="0"/>
+ <action name="verify-all" timeout="0"/>
+ </actions>
+
+ <special tag="rgmanager">
+ </special>
+</resource-agent>
/cvs/cluster/cluster/rgmanager/src/resources/apache.sh,v --> standard output
revision 1.9.2.1
--- cluster/rgmanager/src/resources/apache.sh
+++ - 2006-10-10 13:57:53.180551000 +0000
@@ -0,0 +1,277 @@
+#!/bin/bash
+
+#
+# Copyright Red Hat, Inc. 2006
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; see the file COPYING. If not, write to the
+# Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
+# MA 02139, USA.
+#
+#
+# Author(s):
+# Marek Grac (mgrac at redhat.com)
+#
+
+export LC_ALL=C
+export LANG=C
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+. $(dirname $0)/ocf-shellfuncs
+. $(dirname $0)/utils/config-utils.sh
+. $(dirname $0)/utils/messages.sh
+. $(dirname $0)/utils/ra-skelet.sh
+
+declare APACHE_HTTPD=/usr/sbin/httpd
+declare APACHE_serverConfigFile
+declare APACHE_pid_file="`generate_name_for_pid_file`"
+declare APACHE_conf_dir="`generate_name_for_conf_dir`"
+declare APACHE_genConfig="$APACHE_conf_dir/httpd.conf"
+
+declare APACHE_parseConfig=$(dirname $0)/utils/httpd-parse-config.pl
+
+apache_serverConfigFile()
+{
+ if [[ "$OCF_RESKEY_config_file" =~ '^/' ]]; then
+ APACHE_serverConfigFile="$OCF_RESKEY_config_file"
+ else
+ APACHE_serverConfigFile="$OCF_RESKEY_server_root/$OCF_RESKEY_config_file"
+ fi
+
+ return;
+}
+
+verify_all()
+{
+ clog_service_verify $CLOG_INIT
+
+ if [ -z "$OCF_RESKEY_name" ]; then
+ clog_service_verify $CLOG_FAILED "Invalid Name Of Service"
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ -z "$OCF_RESKEY_service_name" ]; then
+ clog_service_verify $CLOG_FAILED_NOT_CHILD
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ -z "$OCF_RESKEY_server_root" ]; then
+ clog_service_verify $CLOG_FAILED "Invalid ServerRoot"
+ return $OCF_ERR_ARGS
+ fi
+
+ 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_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_config_file"
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ -z "$APACHE_pid_file" ]; then
+ clog_service_verify $CLOG_FAILED "Invalid name of PID file"
+ return $OCF_ERR_ARGS
+ fi
+
+ clog_check_syntax $CLOG_INIT "$APACHE_serverConfigFile"
+
+ "$APACHE_HTTPD" -t \
+ -D"$OCF_RESKEY_name" \
+ -d "$OCF_RESKEY_server_root" \
+ -f "$APACHE_serverConfigFile" \
+ $OCF_RESKEY_httpd_options &> /dev/null
+
+ if [ $? -ne 0 ]; then
+ clog_check_syntax $CLOG_FAILED "$APACHE_config_file"
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_check_syntax $CLOG_SUCCEED "$APACHE_config_file"
+
+ return 0
+}
+
+generate_configFile()
+{
+ declare originalConfigFile=$1;
+ declare generatedConfigFile=$2;
+ declare ip_addresses=$3;
+
+ if [ -f "$generatedConfigFile" ]; then
+ sha1_verify "$generatedConfigFile"
+ if [ $? -ne 0 ]; then
+ clog_check_sha1 $CLOG_FAILED
+ return 0
+ fi
+ fi
+
+ clog_generate_config $CLOG_INIT "$originalConfigFile" "$generatedConfigFile"
+
+ generate_configTemplate "$generatedConfigFile" "$1"
+ cat >> "$generatedConfigFile" << EOT
+# From a cluster perspective, the key fields are:
+# Listen - must be set to service floating IP address.
+# ServerRoot - path to the ServerRoot (initial value is set in service conf)
+#
+
+EOT
+
+ IFS_old="$IFS"
+ IFS=$'\n'
+ for i in `"$APACHE_parseConfig" -D"$OCF_RESKEY_name" < "$originalConfigFile" | grep -P '(^Listen)|(^Port)' | grep -v ':'`; do
+ port=`echo $i | sed 's/^Listen \(.*\)/\1/;s/^Port \(.*\)/\1/'`;
+ IFS=$' ';
+ for z in $ip_addresses; do
+ echo "Listen $z:$port" >> "$generatedConfigFile";
+ done
+ IFS=$'\n';
+ done;
+ IFS="$IFS_old"
+
+ echo "PidFile \"$APACHE_pid_file\"" >> "$generatedConfigFile";
+ echo >> "$generatedConfigFile"
+
+ cat "$originalConfigFile" | sed 's/^Listen/### Listen/;s/^Port/### Port/;s/^PidFile/### PidFile/' | \
+ "$APACHE_parseConfig" -D"$OCF_RESKEY_name" >> "$generatedConfigFile"
+
+ sha1_addToFile "$generatedConfigFile"
+ clog_generate_config $CLOG_SUCCEED "$originalConfigFile" "$generatedConfigFile"
+}
+
+start()
+{
+ declare ccs_fd
+ declare ip_addresses
+
+ clog_service_start $CLOG_INIT
+
+ create_pid_directory
+ create_conf_directory "$APACHE_conf_dir"
+ check_pid_file "$APACHE_pid_file"
+
+ if [ $? -ne 0 ]; then
+ clog_check_pid $CLOG_FAILED "$APACHE_pid_file"
+ clog_service_start $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_looking_for $CLOG_INIT "IP Addresses"
+
+ ccs_fd=$(ccs_connect);
+ if [ $? -ne 0 ]; then
+ clog_looking_for $CLOG_FAILED_CCS
+ return $OCF_ERR_GENERIC
+ fi
+
+ get_service_ip_keys "$ccs_fd" "$OCF_RESKEY_service_name"
+ ip_addresses=`build_ip_list "$ccs_fd"`
+
+ if [ -z "$ip_addresses" ]; then
+ clog_looking_for $CLOG_FAILED_NOT_FOUND "IP Addresses"
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_looking_for $CLOG_SUCCEED "IP Addresses"
+
+ generate_configFile "$APACHE_serverConfigFile" "$APACHE_genConfig" "$ip_addresses"
+
+ "$APACHE_HTTPD" \
+ "-D$OCF_RESKEY_name" \
+ -d "$OCF_RESKEY_server_root" \
+ -f "$APACHE_genConfig" \
+ $OCF_RESKEY_httpd_options \
+ -k start
+
+ if [ $? -ne 0 ]; then
+ clog_service_start $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ else
+ clog_service_start $CLOG_SUCCEED
+ fi
+
+ return 0;
+}
+
+stop()
+{
+ clog_service_stop $CLOG_INIT
+
+ stop_generic "$APACHE_pid_file" "$OCF_RESKEY_shutdown_wait"
+
+ if [ $? -ne 0 ]; then
+ clog_service_stop $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_service_stop $CLOG_SUCCEED
+ return 0;
+}
+
+status()
+{
+ clog_service_status $CLOG_INIT
+
+ status_check_pid "$APACHE_pid_file"
+ if [ $? -ne 0 ]; then
+ clog_service_status $CLOG_FAILED "$APACHE_pid_file"
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_service_status $CLOG_SUCCEED
+ return 0
+}
+
+if [ "$1" != "meta-data" ]; then
+ apache_serverConfigFile
+fi;
+
+case $1 in
+ meta-data)
+ cat `echo $0 | sed 's/^\(.*\)\.sh$/\1.metadata/'`
+ exit 0
+ ;;
+ verify-all)
+ verify_all
+ exit $?
+ ;;
+ start)
+ verify_all && start
+ exit $?
+ ;;
+ stop)
+ verify_all && stop
+ exit $?
+ ;;
+ status|monitor)
+ verify_all
+ status
+ exit $?
+ ;;
+ restart)
+ verify_all
+ stop
+ start
+ exit $?
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|monitor|restart|meta-data|verify-all}"
+ exit $OCF_ERR_GENERIC
+ ;;
+esac
/cvs/cluster/cluster/rgmanager/src/resources/mysql.metadata,v --> standard output
revision 1.3.2.1
--- cluster/rgmanager/src/resources/mysql.metadata
+++ - 2006-10-10 13:57:53.265749000 +0000
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<resource-agent version="rgmanager 2.0" name="mysql">
+ <version>1.0</version>
+
+ <longdesc lang="en">
+ This defines an instance of MySQL database server
+ </longdesc>
+ <shortdesc lang="en">
+ Defines a MySQL database server
+ </shortdesc>
+
+ <parameters>
+ <parameter name="name" primary="1">
+ <longdesc lang="en">
+ Define a name
+ </longdesc>
+ <shortdesc lang="en">
+ Name
+ </shortdesc>
+ <content type="string"/>
+ </parameter>
+
+ <parameter name="config_file">
+ <longdesc lang="en">
+ Define configuration file
+ </longdesc>
+ <shortdesc lang="en">
+ Define configuration file
+ </shortdesc>
+ <content type="string" default="/etc/my.cnf"/>
+ </parameter>
+
+ <parameter name="listen_address">
+ <longdesc lang="en">
+ Define an IP address for MySQL
+ </longdesc>
+ <shortdesc lang="en">
+ Define an IP address for MySQL server. If the address
+ is not given then first IP address from the service is taken.
+ </shortdesc>
+ <content type="string"/>
+ </parameter>
+
+ <parameter name="mysqld_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="shutdown_wait">
+ <longdesc lang="en">
+ Wait X seconds for correct end of service shutdown
+ </longdesc>
+ <shortdesc lang="en">
+ Wait X seconds for correct end of service shutdown
+ </shortdesc>
+ <content type="number" />
+ </parameter>
+
+ <parameter name="service_name" inherit="service%name">
+ <longdesc lang="en">
+ Inherit the service name. We need to know
+ the service name in order to determine file
+ systems and IPs for this service.
+ </longdesc>
+ <shortdesc lang="en">
+ Inherit the service name.
+ </shortdesc>
+ <content type="string"/>
+ </parameter>
+
+ </parameters>
+
+ <actions>
+ <action name="start" timeout="0"/>
+ <action name="stop" timeout="0"/>
+
+ <!-- Checks to see if it''s mounted in the right place -->
+ <action name="status" interval="1m" timeout="10"/>
+ <action name="monitor" interval="1m" timeout="10"/>
+
+ <!-- Checks to see if we can read from the mountpoint -->
+ <action name="status" depth="10" timeout="30" interval="5m"/>
+ <action name="monitor" depth="10" timeout="30" interval="5m"/>
+
+ <action name="meta-data" timeout="0"/>
+ <action name="verify-all" timeout="0"/>
+ </actions>
+
+ <special tag="rgmanager">
+ </special>
+</resource-agent>
/cvs/cluster/cluster/rgmanager/src/resources/mysql.sh,v --> standard output
revision 1.8.2.1
--- cluster/rgmanager/src/resources/mysql.sh
+++ - 2006-10-10 13:57:53.345173000 +0000
@@ -0,0 +1,205 @@
+#!/bin/bash
+
+#
+# Copyright Red Hat, Inc. 2006
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; see the file COPYING. If not, write to the
+# Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
+# MA 02139, USA.
+#
+#
+# Author(s):
+# Marek Grac (mgrac at redhat.com)
+#
+
+export LC_ALL=C
+export LANG=C
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+. $(dirname $0)/ocf-shellfuncs
+. $(dirname $0)/utils/config-utils.sh
+. $(dirname $0)/utils/messages.sh
+. $(dirname $0)/utils/ra-skelet.sh
+
+declare MYSQL_MYSQLD=/usr/bin/mysqld_safe
+declare MYSQL_ipAddress
+declare MYSQL_pid_file="`generate_name_for_pid_file`"
+declare MYSQL_timeout=30
+
+verify_all()
+{
+ clog_service_verify $CLOG_INIT
+
+ if [ -z "$OCF_RESKEY_name" ]; then
+ clog_service_verify $CLOG_FAILED "Invalid Name Of Service"
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ -z "$OCF_RESKEY_service_name" ]; then
+ clog_service_verify $CLOG_FAILED_NOT_CHILD
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ -z "$OCF_RESKEY_config_file" ]; then
+ clog_check_file_exist $CLOG_FAILED_INVALID "$OCF_RESKEY_config_file"
+ clog_service_verify $CLOG_FAILED
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ ! -r "$OCF_RESKEY_config_file" ]; then
+ clog_check_file_exist $CLOG_FAILED_NOT_READABLE $OCF_RESKEY_config_file
+ clog_service_verify $CLOG_FAILED
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ -z "$MYSQL_pid_file" ]; then
+ clog_service_verify $CLOG_FAILED "Invalid name of PID file"
+ return $OCF_ERR_ARGS
+ fi
+
+ clog_service_verify $CLOG_SUCCEED
+ return 0
+}
+
+start()
+{
+ declare ccs_fd;
+
+ clog_service_start $CLOG_INIT
+
+ create_pid_directory
+ check_pid_file "$MYSQL_pid_file"
+
+ if [ $? -ne 0 ]; then
+ clog_check_pid $CLOG_FAILED "$MYSQL_pid_file"
+ clog_service_start $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ if [ -n "$OCF_RESKEY_listen_address" ]; then
+ MYSQL_ipAddress="$OCF_RESKEY_listen_address"
+ else
+ clog_looking_for $CLOG_INIT "IP Address"
+
+ ccs_fd=$(ccs_connect);
+ if [ $? -ne 0 ]; then
+ clog_looking_for $CLOG_FAILED_CCS
+ return $OCF_ERR_GENERIC
+ fi
+
+ get_service_ip_keys "$ccs_fd" "$OCF_RESKEY_service_name"
+ ip_addresses=`build_ip_list "$ccs_fd"`
+
+ if [ -n "$ip_addresses" ]; then
+ for i in $ip_addresses; do
+ MYSQL_ipAddress="$i"
+ break;
+ done
+ else
+ clog_looking_for $CLOG_FAILED_NOT_FOUND "IP Address"
+ fi
+ fi
+
+ clog_looking_for $CLOG_SUCCEED "IP Address"
+
+ $MYSQL_MYSQLD --defaults-file="$OCF_RESKEY_config_file" \
+ --pid-file="$MYSQL_pid_file" \
+ --bind-address="$MYSQL_ipAddress" \
+ $OCF_RESKEY_mysqld_options > /dev/null 2>&1 &
+
+ if [ $? -ne 0 ]; then
+ clog_service_start $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ while [ "$MYSQL_timeout" -gt 0 ]; do
+ if [ -f "$MYSQL_pid_file" ]; then
+ break;
+ fi
+ sleep 1
+ let MYSQL_timeout=${MYSQL_timeout}-1
+ done
+
+ if [ "$MYSQL_timeout" -eq 0 ]; then
+ clog_service_start $CLOG_FAILED_TIMEOUT
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_service_start $CLOG_SUCCEED
+
+ return 0;
+}
+
+stop()
+{
+ clog_service_stop $CLOG_INIT
+
+ stop_generic "$MYSQL_pid_file" "$OCF_RESKEY_shutdown_wait"
+
+ if [ $? -ne 0 ]; then
+ clog_service_stop $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_service_stop $CLOG_SUCCEED
+ return 0;
+}
+
+status()
+{
+ clog_service_status $CLOG_INIT
+
+ status_check_pid "$MYSQL_pid_file"
+ if [ $? -ne 0 ]; then
+ clog_service_status $CLOG_FAILED "$MYSQL_pid_file"
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_service_status $CLOG_SUCCEED
+ return 0
+}
+
+case $1 in
+ meta-data)
+ cat `echo $0 | sed 's/^\(.*\)\.sh$/\1.metadata/'`
+ exit 0
+ ;;
+ verify-all)
+ verify_all
+ exit $?
+ ;;
+ start)
+ verify_all && start
+ exit $?
+ ;;
+ stop)
+ verify_all && stop
+ exit $?
+ ;;
+ status|monitor)
+ verify_all
+ status
+ exit $?
+ ;;
+ restart)
+ verify_all
+ stop
+ start
+ exit $?
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|monitor|restart|meta-data|verify-all}"
+ exit $OCF_ERR_GENERIC
+ ;;
+esac
/cvs/cluster/cluster/rgmanager/src/resources/openldap.metadata,v --> standard output
revision 1.2.2.1
--- cluster/rgmanager/src/resources/openldap.metadata
+++ - 2006-10-10 13:57:53.424523000 +0000
@@ -0,0 +1,98 @@
+<?xml version="1.0"?>
+<resource-agent version="rgmanager 2.0" name="openldap">
+ <version>1.0</version>
+
+ <longdesc lang="en">
+ This defines an instance of Open LDAP
+ </longdesc>
+ <shortdesc lang="en">
+ Defines an Open LDAP server
+ </shortdesc>
+
+ <parameters>
+ <parameter name="name" primary="1">
+ <longdesc lang="en">
+ Specifies a service name for logging and other purposes
+ </longdesc>
+ <shortdesc lang="en">
+ Name
+ </shortdesc>
+ <content type="string"/>
+ </parameter>
+
+ <parameter name="config_file">
+ <longdesc lang="en">
+ Define absolute path to configuration file
+ </longdesc>
+ <shortdesc lang="en">
+ Config File
+ </shortdesc>
+ <content type="string" default="/etc/openldap/slapd.conf"/>
+ </parameter>
+
+ <parameter name="url_list">
+ <longdesc lang="en">
+ Serve URL list. Default behaviour of URL list is changed and
+ enhanced. eg. ldap:/// won't bind all IP address on the
+ computer but to all IP addresses in service. Using
+ ldap://0:port/ will bind to all IP addresses for service on
+ given port.
+ </longdesc>
+ <shortdesc lang="en">
+ URL list
+ </shortdesc>
+ <content type="string" default="ldap:///"/>
+ </parameter>
+
+ <parameter name="slapd_options">
+ <longdesc lang="en">
+ Other command-line options for slapd
+ </longdesc>
+ <shortdesc lang="en">
+ Other command-line options for slapd
+ </shortdesc>
+ <content type="string" />
+ </parameter>
+
+ <parameter name="shutdown_wait">
+ <longdesc lang="en">
+ Wait X seconds for correct end of service shutdown
+ </longdesc>
+ <shortdesc lang="en">
+ Wait X seconds for correct end of service shutdown
+ </shortdesc>
+ <content type="number" />
+ </parameter>
+
+ <parameter name="service_name" inherit="service%name">
+ <longdesc lang="en">
+ Inherit the service name. We need to know
+ the service name in order to determine file
+ systems and IPs for this service.
+ </longdesc>
+ <shortdesc lang="en">
+ Inherit the service name.
+ </shortdesc>
+ <content type="string"/>
+ </parameter>
+ </parameters>
+
+ <actions>
+ <action name="start" timeout="0"/>
+ <action name="stop" timeout="0"/>
+
+ <!-- Checks to see if it''s mounted in the right place -->
+ <action name="status" interval="1m" timeout="10"/>
+ <action name="monitor" interval="1m" timeout="10"/>
+
+ <!-- Checks to see if we can read from the mountpoint -->
+ <action name="status" depth="10" timeout="30" interval="5m"/>
+ <action name="monitor" depth="10" timeout="30" interval="5m"/>
+
+ <action name="meta-data" timeout="0"/>
+ <action name="verify-all" timeout="0"/>
+ </actions>
+
+ <special tag="rgmanager">
+ </special>
+</resource-agent>
/cvs/cluster/cluster/rgmanager/src/resources/openldap.sh,v --> standard output
revision 1.7.2.1
--- cluster/rgmanager/src/resources/openldap.sh
+++ - 2006-10-10 13:57:53.529402000 +0000
@@ -0,0 +1,240 @@
+#!/bin/bash
+
+#
+# Copyright Red Hat, Inc. 2006
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; see the file COPYING. If not, write to the
+# Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
+# MA 02139, USA.
+#
+#
+# Author(s):
+# Marek Grac (mgrac at redhat.com)
+#
+
+export LC_ALL=C
+export LANG=C
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+. $(dirname $0)/ocf-shellfuncs
+. $(dirname $0)/utils/config-utils.sh
+. $(dirname $0)/utils/messages.sh
+. $(dirname $0)/utils/ra-skelet.sh
+
+declare LDAP_SLAPD=/usr/sbin/slapd
+declare LDAP_pid_file="`generate_name_for_pid_file`"
+declare LDAP_conf_dir="`generate_name_for_conf_dir`"
+declare LDAP_gen_config_file="$LDAP_conf_dir/slapd.conf"
+declare LDAP_url_list
+
+verify_all()
+{
+ clog_service_verify $CLOG_INIT
+
+ if [ -z "$OCF_RESKEY_name" ]; then
+ clog_service_verify $CLOG_FAILED "Invalid Name Of Service"
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ -z "$OCF_RESKEY_service_name" ]; then
+ clog_service_verify $CLOG_FAILED_NOT_CHILD
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ -z "$OCF_RESKEY_config_file" ]; then
+ clog_check_file_exist $CLOG_FAILED_INVALID "$OCF_RESKEY_config_file"
+ clog_service_verify $CLOG_FAILED
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ ! -r "$OCF_RESKEY_config_file" ]; then
+ clog_check_file_exist $CLOG_FAILED_NOT_READABLE $OCF_RESKEY_config_file
+ clog_service_verify $CLOG_FAILED
+ return $OCF_ERR_ARGS
+ fi
+
+ clog_service_verify $CLOG_SUCCEED
+
+ return 0
+}
+
+generate_url_list()
+{
+ declare ldap_url_source=$1
+ declare ip_addresses=$2
+ declare url_list
+ declare tmp;
+
+ for u in $ldap_url_source; do
+ if [[ "$u" =~ ':///' ]]; then
+ for z in $ip_addresses; do
+ tmp=`echo $u | sed "s,://,://$z,"`
+ url_list="$url_list $tmp"
+ done
+ elif [[ "$u" =~ '://0:' ]]; then
+ for z in $ip_addresses; do
+ tmp=`echo $u | sed "s,://0:,://$z:,"`
+ url_list="$url_list $tmp"
+ done
+ else
+ url_list="$url_list $u"
+ fi
+ done
+
+ echo $url_list
+}
+
+generate_config_file()
+{
+ declare original_file="$1"
+ declare generated_file="$2"
+
+ if [ -f "$generated_file" ]; then
+ sha1_verify "$generated_file"
+ if [ $? -ne 0 ]; then
+ clog_check_sha1 $CLOG_FAILED
+ return 0
+ fi
+ fi
+
+ clog_generate_config $CLOG_INIT "$original_file" "$generated_file"
+
+ generate_configTemplate "$generated_file" "$1"
+ echo "pidfile \"$LDAP_pid_file\"" >> $generated_file
+ echo >> $generated_file
+ sed 's/^[[:space:]]*pidfile/### pidfile/i' < "$original_file" >> "$generated_file"
+
+ sha1_addToFile "$generated_file"
+ clog_generate_config $CLOG_SUCCEED "$original_file" "$generated_file"
+
+ return 0;
+}
+
+start()
+{
+ declare ccs_fd;
+
+ clog_service_start $CLOG_INIT
+
+ create_pid_directory
+ create_conf_directory "$LDAP_conf_dir"
+ check_pid_file "$LDAP_pid_file"
+
+ if [ $? -ne 0 ]; then
+ clog_check_pid $CLOG_FAILED "$LDAP_pid_file"
+ clog_service_start $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+ clog_looking_for $CLOG_INIT "IP Addresses"
+
+ ccs_fd=$(ccs_connect);
+ if [ $? -ne 0 ]; then
+ clog_looking_for $CLOG_FAILED_CCS
+ return $OCF_ERR_GENERIC
+ fi
+
+ get_service_ip_keys "$ccs_fd" "$OCF_RESKEY_service_name"
+ ip_addresses=`build_ip_list "$ccs_fd"`
+
+ if [ -z "$ip_addresses" ]; then
+ clog_looking_for $CLOG_FAILED_NOT_FOUND "IP Addresses"
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_looking_for $CLOG_SUCCEED "IP Addresses"
+
+ LDAP_url_list=`generate_url_list "$OCF_RESKEY_url_list" "$ip_addresses"`
+
+ if [ -z "$LDAP_url_list" ]; then
+ ocf_log error "Generating URL List for $OCF_RESOURCE_INSTANCE > Failed"
+ return $OCF_ERR_GENERIC
+ fi
+
+ generate_config_file "$OCF_RESKEY_config_file" "$LDAP_gen_config_file"
+
+ $LDAP_SLAPD -f "$LDAP_gen_config_file" -n "$OCF_RESOURCE_INSTANCE" \
+ -h "$LDAP_url_list" $OCF_RESKEY_slapd_options
+
+ if [ $? -ne 0 ]; then
+ clog_service_start $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_service_start $CLOG_SUCCEED
+
+ return 0;
+}
+
+stop()
+{
+ clog_service_stop $CLOG_INIT
+
+ stop_generic "$LDAP_pid_file" "$OCF_RESKEY_shutdown_wait"
+
+ if [ $? -ne 0 ]; then
+ clog_service_stop $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_service_stop $CLOG_SUCCEED
+ return 0;
+}
+
+status()
+{
+ clog_service_status $CLOG_INIT
+
+ status_check_pid "$LDAP_pid_file"
+ if [ $? -ne 0 ]; then
+ clog_service_status $CLOG_FAILED "$LDAP_pid_file"
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_service_status $CLOG_SUCCEED
+ return 0
+}
+
+case $1 in
+ meta-data)
+ cat `echo $0 | sed 's/^\(.*\)\.sh$/\1.metadata/'`
+ exit 0
+ ;;
+ verify-all)
+ verify_all
+ exit $?
+ ;;
+ start)
+ verify_all && start
+ exit $?
+ ;;
+ stop)
+ verify_all && stop
+ exit $?
+ ;;
+ status|monitor)
+ verify_all
+ status
+ exit $?
+ ;;
+ restart)
+ verify_all
+ stop
+ start
+ exit $?
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|monitor|restart|meta-data|verify-all}"
+ exit $OCF_ERR_GENERIC
+ ;;
+esac
/cvs/cluster/cluster/rgmanager/src/resources/postgres-8.metadata,v --> standard output
revision 1.2.2.1
--- cluster/rgmanager/src/resources/postgres-8.metadata
+++ - 2006-10-10 13:57:53.610835000 +0000
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<resource-agent version="rgmanager 2.0" name="postgres-8">
+ <version>1.0</version>
+
+ <longdesc lang="en">
+ This defines an instance of PostgreSQL server
+ </longdesc>
+ <shortdesc lang="en">
+ Defines a PostgreSQL server
+ </shortdesc>
+
+ <parameters>
+ <parameter name="name" primary="1">
+ <longdesc lang="en">
+ Specifies a service name for logging and other purposes
+ </longdesc>
+ <shortdesc lang="en">
+ Name
+ </shortdesc>
+ <content type="string"/>
+ </parameter>
+
+ <parameter name="config_file">
+ <longdesc lang="en">
+ Define absolute path to configuration file
+ </longdesc>
+ <shortdesc lang="en">
+ Config File
+ </shortdesc>
+ <content type="string" default="/var/lib/pgsql/data/postgresql.conf"/>
+ </parameter>
+
+ <parameter name="postmaster_user">
+ <longdesc lang="en">
+ User who runs the database server because it can't be
+ run by root.
+ </longdesc>
+ <shortdesc lang="en">
+ User who runs the database server
+ </shortdesc>
+ <content type="string" default="postgres" />
+ </parameter>
+
+ <parameter name="postmaster_options">
+ <longdesc lang="en">
+ Other command-line options for postmaster
+ </longdesc>
+ <shortdesc lang="en">
+ Other command-line options for postmaster
+ </shortdesc>
+ <content type="string" />
+ </parameter>
+
+ <parameter name="shutdown_wait">
+ <longdesc lang="en">
+ Wait X seconds for correct end of service shutdown
+ </longdesc>
+ <shortdesc lang="en">
+ Wait X seconds for correct end of service shutdown
+ </shortdesc>
+ <content type="number" />
+ </parameter>
+
+ <parameter name="service_name" inherit="service%name">
+ <longdesc lang="en">
+ Inherit the service name. We need to know
+ the service name in order to determine file
+ systems and IPs for this service.
+ </longdesc>
+ <shortdesc lang="en">
+ Inherit the service name.
+ </shortdesc>
+ <content type="string"/>
+ </parameter>
+ </parameters>
+
+ <actions>
+ <action name="start" timeout="0"/>
+ <action name="stop" timeout="0"/>
+
+ <!-- Checks to see if it''s mounted in the right place -->
+ <action name="status" interval="1m" timeout="10"/>
+ <action name="monitor" interval="1m" timeout="10"/>
+
+ <!-- Checks to see if we can read from the mountpoint -->
+ <action name="status" depth="10" timeout="30" interval="5m"/>
+ <action name="monitor" depth="10" timeout="30" interval="5m"/>
+
+ <action name="meta-data" timeout="0"/>
+ <action name="verify-all" timeout="0"/>
+ </actions>
+
+ <special tag="rgmanager">
+ </special>
+</resource-agent>
/cvs/cluster/cluster/rgmanager/src/resources/postgres-8.sh,v --> standard output
revision 1.5.2.1
--- cluster/rgmanager/src/resources/postgres-8.sh
+++ - 2006-10-10 13:57:53.710367000 +0000
@@ -0,0 +1,225 @@
+#!/bin/bash
+
+#
+# Copyright Red Hat, Inc. 2006
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; see the file COPYING. If not, write to the
+# Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
+# MA 02139, USA.
+#
+#
+# Author(s):
+# Marek Grac (mgrac at redhat.com)
+#
+
+export LC_ALL=C
+export LANG=C
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+. $(dirname $0)/ocf-shellfuncs
+. $(dirname $0)/utils/config-utils.sh
+. $(dirname $0)/utils/messages.sh
+. $(dirname $0)/utils/ra-skelet.sh
+
+declare PSQL_POSTMASTER="/usr/bin/postmaster"
+declare PSQL_pid_file="`generate_name_for_pid_file`"
+declare PSQL_conf_dir="`generate_name_for_conf_dir`"
+declare PSQL_gen_config_file="$PSQL_conf_dir/postgresql.conf"
+
+verify_all()
+{
+ clog_service_verify $CLOG_INIT
+
+ if [ -z "$OCF_RESKEY_name" ]; then
+ clog_service_verify $CLOG_FAILED "Invalid Name Of Service"
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ -z "$OCF_RESKEY_service_name" ]; then
+ clog_service_verify $CLOG_FAILED_NOT_CHILD
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ -z "$OCF_RESKEY_config_file" ]; then
+ clog_check_file_exist $CLOG_FAILED_INVALID "$OCF_RESKEY_config_file"
+ clog_service_verify $CLOG_FAILED
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ ! -r "$OCF_RESKEY_config_file" ]; then
+ clog_check_file_exist $CLOG_FAILED_NOT_READABLE $OCF_RESKEY_config_file
+ clog_service_verify $CLOG_FAILED
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ -z "$OCF_RESKEY_postmaster_user" ]; then
+ clog_servicer_verify $CLOG_FAILED "Invalid User"
+ return $OCF_ERR_ARGS
+ fi
+
+ clog_service_verify $CLOG_SUCCEED
+
+ return 0
+}
+
+generate_config_file()
+{
+ declare original_file="$1"
+ declare generated_file="$2"
+ declare ip_addressess="$3"
+
+ declare ip_comma="";
+
+ if [ -f "$generated_file" ]; then
+ sha1_verify "$generated_file"
+ if [ $? -ne 0 ]; then
+ clog_check_sha1 $CLOG_FAILED
+ return 0
+ fi
+ fi
+
+ clog_generate_config $CLOG_INIT "$original_file" "$generated_file"
+
+ declare x=1
+ for i in $ip_addressess; do
+ if [ $x -eq 1 ]; then
+ x=0
+ ip_comma=$i
+ else
+ ip_comma=$ip_comma,$i
+ fi
+ done
+
+ generate_configTemplate "$generated_file" "$1"
+ echo "external_pid_file = '$PSQL_pid_file'" >> $generated_file
+ echo "listen_address = '$ip_comma'" >> $generated_file
+
+ echo >> $generated_file
+ sed 's/^[[:space:]]*external_pid_file/### external_pid_file/i;s/^[[:space:]]*listen_address/### listen_address/i' < "$original_file" >> "$generated_file"
+
+ sha1_addToFile "$generated_file"
+ clog_generate_config $CLOG_SUCCEED "$original_file" "$generated_file"
+
+ return 0;
+}
+
+start()
+{
+ declare ccs_fd;
+
+ clog_service_start $CLOG_INIT
+
+ create_pid_directory
+ create_conf_directory "$PSQL_conf_dir"
+ check_pid_file "$PSQL_pid_file"
+
+ if [ $? -ne 0 ]; then
+ clog_check_pid $CLOG_FAILED "$PSQL_pid_file"
+ clog_service_start $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_looking_for $CLOG_INIT "IP Addresses"
+
+ ccs_fd=$(ccs_connect);
+ if [ $? -ne 0 ]; then
+ clog_looking_for $CLOG_FAILED_CCS
+ return $OCF_ERR_GENERIC
+ fi
+
+ get_service_ip_keys "$ccs_fd" "$OCF_RESKEY_service_name"
+ ip_addresses=`build_ip_list "$ccs_fd"`
+
+ if [ -z "$ip_addresses" ]; then
+ clog_looking_for $CLOG_FAILED_NOT_FOUND "IP Addresses"
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_looking_for $CLOG_SUCCEED "IP Addresses"
+
+ generate_config_file "$OCF_RESKEY_config_file" "$PSQL_gen_config_file" "$ip_addresses"
+
+ sudo -u "$OCF_RESKEY_postmaster_user" $PSQL_POSTMASTER -c config_file="$PSQL_gen_config_file" \
+ $OCF_RESKEY_postmaster_options
+
+ if [ $? -ne 0 ]; then
+ clog_service_start $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_service_start $CLOG_SUCCEED
+ return 0;
+}
+
+stop()
+{
+ clog_service_stop $CLOG_INIT
+
+ stop_generic "$PSQL_pid_file" "$OCF_RESKEY_shutdown_wait"
+ if [ $? -ne 0 ]; then
+ clog_service_stop $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_service_stop $CLOG_SUCCEED
+ return 0;
+}
+
+status()
+{
+ clog_service_status $CLOG_INIT
+
+ status_check_pid "$PSQL_pid_file"
+ if [ $? -ne 0 ]; then
+ clog_service_status $CLOG_FAILED "$PSQL_pid_file"
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_service_status $CLOG_SUCCEED
+ return 0
+}
+
+case $1 in
+ meta-data)
+ cat `echo $0 | sed 's/^\(.*\)\.sh$/\1.metadata/'`
+ exit 0
+ ;;
+ verify-all)
+ verify_all
+ exit $?
+ ;;
+ start)
+ verify_all && start
+ exit $?
+ ;;
+ stop)
+ verify_all && stop
+ exit $?
+ ;;
+ status|monitor)
+ verify_all
+ status
+ exit $?
+ ;;
+ restart)
+ verify_all
+ stop
+ start
+ exit $?
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|monitor|restart|meta-data|verify-all}"
+ exit $OCF_ERR_GENERIC
+ ;;
+esac
/cvs/cluster/cluster/rgmanager/src/resources/samba.metadata,v --> standard output
revision 1.2.2.1
--- cluster/rgmanager/src/resources/samba.metadata
+++ - 2006-10-10 13:57:53.812886000 +0000
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+<resource-agent version="rgmanager 2.0" name="samba">
+ <version>1.0</version>
+
+ <longdesc lang="en">
+ Dynamic smbd/nmbd resource agent
+ </longdesc>
+ <shortdesc lang="en">
+ Dynamic smbd/nmbd resource agent
+ </shortdesc>
+
+ <parameters>
+ <parameter name="name" unique="1" primary="1">
+ <longdesc lang="en">
+ Samba Symbolic Name.
+ </longdesc>
+ <shortdesc lang="en">
+ Samba Name
+ </shortdesc>
+ <content type="string"/>
+ </parameter>
+
+ <parameter name="config_file">
+ <longdesc lang="en">
+ Define absolute path to configuration file
+ </longdesc>
+ <shortdesc lang="en">
+ Config File
+ </shortdesc>
+ <content type="string" default="/etc/samba/smb.conf"/>
+ </parameter>
+
+ <parameter name="smbd_options">
+ <longdesc lang="en">
+ Other command-line options for smbd
+ </longdesc>
+ <shortdesc lang="en">
+ Other command-line options for smbd
+ </shortdesc>
+ <content type="string" />
+ </parameter>
+
+ <parameter name="nmbd_options">
+ <longdesc lang="en">
+ Other command-line options for nmbd
+ </longdesc>
+ <shortdesc lang="en">
+ Other command-line options for nmbd
+ </shortdesc>
+ <content type="string" />
+ </parameter>
+
+ <parameter name="shutdown_wait">
+ <longdesc lang="en">
+ Wait X seconds for correct end of service shutdown
+ </longdesc>
+ <shortdesc lang="en">
+ Wait X seconds for correct end of service shutdown
+ </shortdesc>
+ <content type="number" />
+ </parameter>
+
+ <parameter name="service_name" inherit="service%name">
+ <longdesc lang="en">
+ Inherit the service name. We need to know
+ the service name in order to determine file
+ systems and IPs for this smb service.
+ </longdesc>
+ <shortdesc lang="en">
+ Inherit the service name.
+ </shortdesc>
+ <content type="string"/>
+ </parameter>
+ </parameters>
+
+ <actions>
+ <action name="start" timeout="0"/>
+ <action name="stop" timeout="0"/>
+
+ <!-- This is just a wrapper for LSB init scripts, so monitor
+ and status can't have a timeout, nor do they do any extra
+ work regardless of the depth -->
+ <action name="status" interval="30s" timeout="0"/>
+ <action name="monitor" interval="30s" timeout="0"/>
+
+ <action name="meta-data" timeout="0"/>
+ <action name="verify-all" timeout="0"/>
+ </actions>
+</resource-agent>
/cvs/cluster/cluster/rgmanager/src/resources/samba.sh,v --> standard output
revision 1.5.2.1
--- cluster/rgmanager/src/resources/samba.sh
+++ - 2006-10-10 13:57:53.892557000 +0000
@@ -0,0 +1,254 @@
+#!/bin/bash
+
+#
+# Copyright Red Hat, Inc. 2006
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; see the file COPYING. If not, write to the
+# Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
+# MA 02139, USA.
+#
+#
+# Author(s):
+# Marek Grac (mgrac at redhat.com)
+#
+
+export LC_ALL=C
+export LANG=C
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+. $(dirname $0)/ocf-shellfuncs
+. $(dirname $0)/utils/config-utils.sh
+. $(dirname $0)/utils/messages.sh
+. $(dirname $0)/utils/ra-skelet.sh
+
+declare SAMBA_SMBD=/usr/sbin/smbd
+declare SAMBA_NMBD=/usr/sbin/nmbd
+declare SAMBA_pid_dir="`generate_name_for_pid_dir`"
+declare SAMBA_conf_dir="`generate_name_for_conf_dir`"
+declare SAMBA_smbd_pid_file="$SAMBA_pid_dir/smbd.pid"
+declare SAMBA_nmbd_pid_file="$SAMBA_pid_dir/nmbd.pid"
+declare SAMBA_gen_config_file="$SAMBA_conf_dir/smb.conf"
+
+verify_all()
+{
+ clog_service_verify $CLOG_INIT
+
+ if [ -z "$OCF_RESKEY_name" ]; then
+ clog_service_verify $CLOG_FAILED "Invalid Name Of Service"
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ -z "$OCF_RESKEY_service_name" ]; then
+ clog_service_verify $CLOG_FAILED_NOT_CHILD
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ -z "$OCF_RESKEY_config_file" ]; then
+ clog_check_file_exist $CLOG_FAILED_INVALID "$OCF_RESKEY_config_file"
+ clog_service_verify $CLOG_FAILED
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ ! -r "$OCF_RESKEY_config_file" ]; then
+ clog_check_file_exist $CLOG_FAILED_NOT_READABLE $OCF_RESKEY_config_file
+ clog_service_verify $CLOG_FAILED
+ return $OCF_ERR_ARGS
+ fi
+
+ clog_service_verify $CLOG_SUCCEED
+
+ return 0
+}
+
+generate_config_file()
+{
+ declare original_file="$1"
+ declare generated_file="$2"
+ declare ip_addresses="$3"
+
+ if [ -f "$generated_file" ]; then
+ sha1_verify "$generated_file"
+ if [ $? -ne 0 ]; then
+ clog_check_sha1 $CLOG_FAILED
+ return 0
+ fi
+ fi
+
+ clog_generate_config $CLOG_INIT "$original_file" "$generated_file"
+
+ generate_configTemplate "$generated_file" "$1"
+
+ echo "pid directory = \"$SAMBA_pid_dir\"" >> $generated_file
+ echo "interfaces = $ip_addresses" >> $generated_file
+ echo "bind interfaces only = Yes" >> $generated_file
+ echo "netbios name = \"$OCF_RESKEY_name\"" >> $generated_file
+ echo >> $generated_file
+ sed 's/^[[:space:]]*pid directory/### pid directory/i;s/^[[:space:]]*interfaces/### interfaces/i;s/^[[:space:]]*bind interfaces only/### bind interfaces only/i;s/^[[:space:]]*netbios name/### netbios name/i' \
+ < "$original_file" >> "$generated_file"
+
+ sha1_addToFile "$generated_file"
+ clog_generate_config $CLOG_SUCCEED "$original_file" "$generated_file"
+
+ return 0;
+}
+
+start()
+{
+ declare ccs_fd;
+
+ clog_service_start $CLOG_INIT
+
+ create_pid_directory
+ mkdir -p "$SAMBA_pid_dir"
+ create_conf_directory "$SAMBA_conf_dir"
+ check_pid_file "$SAMBA_smbd_pid_file"
+
+ if [ $? -ne 0 ]; then
+ clog_check_pid $CLOG_FAILED "$SAMBA_smbd_pid_file"
+ clog_service_start $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ check_pid_file "$SAMBA_nmbd_pid_file"
+
+ if [ $? -ne 0 ]; then
+ clog_check_pid $CLOG_FAILED "$SAMBA_nmbd_pid_file"
+ clog_service_start $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_looking_for $CLOG_INIT "IP Addresses"
+
+ ccs_fd=$(ccs_connect);
+ if [ $? -ne 0 ]; then
+ clog_looking_for $CLOG_FAILED_CCS
+ return $OCF_ERR_GENERIC
+ fi
+
+ get_service_ip_keys "$ccs_fd" "$OCF_RESKEY_service_name"
+ ip_addresses=`build_ip_list "$ccs_fd"`
+
+ if [ -z "$ip_addresses" ]; then
+ clog_looking_for $CLOG_FAILED_NOT_FOUND "IP Addresses"
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_looking_for $CLOG_SUCCEED "IP Addresses"
+
+ generate_config_file "$OCF_RESKEY_config_file" "$SAMBA_gen_config_file" "$ip_addresses"
+
+ $SAMBA_SMBD -D -s "$SAMBA_gen_config_file" $OCF_RESKEY_smbd_options
+
+ if [ $? -ne 0 ]; then
+ clog_service_start $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ $SAMBA_NMBD -D -s "$SAMBA_gen_config_file" $OCF_RESKEY_nmbd_options
+
+ if [ $? -ne 0 ]; then
+ clog_service_start $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_service_start $CLOG_SUCCEED
+
+ return 0;
+}
+
+stop()
+{
+ clog_service_stop $CLOG_INIT
+
+ stop_generic "$SAMBA_smbd_pid_file" "$OCF_RESKEY_shutdown_wait"
+
+ if [ $? -ne 0 ]; then
+ clog_service_stop $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ stop_generic "$SAMBA_nmbd_pid_file"
+
+ if [ $? -ne 0 ]; then
+ clog_service_stop $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ if [ -e "$SAMBA_smbd_pid_file" ]; then
+ rm -f "$SAMBA_smbd_pid_file"
+ fi
+
+ if [ -e "$SAMBA_nmbd_pid_file" ]; then
+ rm -f "$SAMBA_nmbd_pid_file"
+ fi
+
+ clog_service_stop $CLOG_SUCCEED
+ return 0;
+}
+
+status()
+{
+ clog_service_status $CLOG_INIT
+
+ status_check_pid "$SAMBA_smbd_pid_file"
+
+ if [ $? -ne 0 ]; then
+ clog_service_status $CLOG_FAILED "$SAMBA_smbd_pid_file"
+ return $OCF_ERR_GENERIC
+ fi
+
+ status_check_pid "$SAMBA_nmbd_pid_file"
+
+ if [ $? -ne 0 ]; then
+ clog_service_status $CLOG_FAILED "$SAMBA_nmbd_pid_file"
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_service_status $CLOG_SUCCEED
+ return 0
+}
+
+case $1 in
+ meta-data)
+ cat `echo $0 | sed 's/^\(.*\)\.sh$/\1.metadata/'`
+ exit 0
+ ;;
+ verify-all)
+ verify_all
+ exit $?
+ ;;
+ start)
+ verify_all && start
+ exit $?
+ ;;
+ stop)
+ verify_all && stop
+ exit $?
+ ;;
+ status|monitor)
+ verify_all
+ status
+ exit $?
+ ;;
+ restart)
+ verify_all
+ stop
+ start
+ exit $?
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|monitor|restart|meta-data|verify-all}"
+ exit $OCF_ERR_GENERIC
+ ;;
+esac
/cvs/cluster/cluster/rgmanager/src/resources/tomcat-5.metadata,v --> standard output
revision 1.1.2.1
--- cluster/rgmanager/src/resources/tomcat-5.metadata
+++ - 2006-10-10 13:57:53.983759000 +0000
@@ -0,0 +1,104 @@
+<?xml version="1.0"?>
+<resource-agent version="rgmanager 2.0" name="tomcat-5">
+ <version>1.0</version>
+
+ <longdesc lang="en">
+ This defines an instance of Tomcat server
+ </longdesc>
+ <shortdesc lang="en">
+ Defines a Tomcat server
+ </shortdesc>
+
+ <parameters>
+ <parameter name="name" primary="1">
+ <longdesc lang="en">
+ Specifies a service name for logging and other purposes
+ </longdesc>
+ <shortdesc lang="en">
+ Name
+ </shortdesc>
+ <content type="string"/>
+ </parameter>
+
+ <parameter name="config_file">
+ <longdesc lang="en">
+ Define absolute path to configuration file
+ </longdesc>
+ <shortdesc lang="en">
+ Config File
+ </shortdesc>
+ <content type="string" default="/etc/tomcat5/tomcat5.conf"/>
+ </parameter>
+
+ <parameter name="tomcat_user">
+ <longdesc lang="en">
+ User who runs the Tomcat server
+ </longdesc>
+ <shortdesc lang="en">
+ User who runs the Tomcat server
+ </shortdesc>
+ <content type="string" default="tomcat" />
+ </parameter>
+
+ <parameter name="catalina_options">
+ <longdesc lang="en">
+ Other command-line options for Catalina
+ </longdesc>
+ <shortdesc lang="en">
+ Other command-line options for Catalina
+ </shortdesc>
+ <content type="string" />
+ </parameter>
+
+ <parameter name="catalina_base">
+ <longdesc lang="en">
+ Cataliny base directory
+ </longdesc>
+ <shortdesc lang="en">
+ Catalina base directory (differs for each service)
+ </shortdesc>
+ <content type="string" default="/usr/share/tomcat5" />
+ </parameter>
+
+ <parameter name="shutdown_wait">
+ <longdesc lang="en">
+ Wait X seconds for correct end of service shutdown
+ </longdesc>
+ <shortdesc lang="en">
+ Wait X seconds for correct end of service shutdown
+ </shortdesc>
+ <content type="number" default="30" />
+ </parameter>
+
+ <parameter name="service_name" inherit="service%name">
+ <longdesc lang="en">
+ Inherit the service name. We need to know
+ the service name in order to determine file
+ systems and IPs for this service.
+ </longdesc>
+ <shortdesc lang="en">
+ Inherit the service name.
+ </shortdesc>
+ <content type="string"/>
+ </parameter>
+ </parameters>
+
+ <actions>
+ <action name="start" timeout="0"/>
+ <action name="stop" timeout="0"/>
+
+ <!-- Checks to see if it''s mounted in the right place -->
+ <action name="status" interval="1m" timeout="10"/>
+ <action name="monitor" interval="1m" timeout="10"/>
+
+ <!-- Checks to see if we can read from the mountpoint -->
+ <action name="status" depth="10" timeout="30" interval="5m"/>
+ <action name="monitor" depth="10" timeout="30" interval="5m"/>
+
+ <action name="meta-data" timeout="0"/>
+ <action name="verify-all" timeout="0"/>
+ </actions>
+
+ <special tag="rgmanager">
+ </special>
+</resource-agent>
/cvs/cluster/cluster/rgmanager/src/resources/tomcat-5.sh,v --> standard output
revision 1.1.2.1
--- cluster/rgmanager/src/resources/tomcat-5.sh
+++ - 2006-10-10 13:57:54.079389000 +0000
@@ -0,0 +1,287 @@
+#!/bin/bash
+
+#
+# Copyright Red Hat, Inc. 2006
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Gener5~al Public License as published by the
+# Free Software Foundation; either version 2, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; see the file COPYING. If not, write to the
+# Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
+# MA 02139, USA.
+#
+#
+# Author(s):
+# Marek Grac (mgrac at redhat.com)
+#
+
+export LC_ALL=C
+export LANG=C
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+. $(dirname $0)/ocf-shellfuncs
+. $(dirname $0)/utils/config-utils.sh
+. $(dirname $0)/utils/messages.sh
+. $(dirname $0)/utils/ra-skelet.sh
+
+declare TOMCAT_TOMCAT=/usr/bin/dtomcat5
+declare TOMCAT_RELINK=/usr/share/tomcat5/bin/relink
+declare TOMCAT_pid_file="`generate_name_for_pid_file`"
+declare TOMCAT_conf_dir="`generate_name_for_conf_dir`/conf"
+declare TOMCAT_gen_config_file="$TOMCAT_conf_dir/server.xml"
+declare TOMCAT_gen_catalina_base="`generate_name_for_conf_dir`"
+
+declare JAVA_HOME
+declare CATALINA_HOME
+declare CATALINA_BASE
+declare CATALINA_TMPDIR
+declare CLASSPATH
+declare TOMCAT_USER
+##
+
+verify_all()
+{
+ clog_service_verify $CLOG_INIT
+
+ if [ -z "$OCF_RESKEY_name" ]; then
+ clog_service_verify $CLOG_FAILED "Invalid Name Of Service"
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ -z "$OCF_RESKEY_service_name" ]; then
+ clog_service_verify $CLOG_FAILED_NOT_CHILD
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ -z "$OCF_RESKEY_config_file" ]; then
+ clog_check_file_exist $CLOG_FAILED_INVALID "$OCF_RESKEY_config_file"
+ clog_service_verify $CLOG_FAILED
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ ! -r "$OCF_RESKEY_config_file" ]; then
+ clog_check_file_exist $CLOG_FAILED_NOT_READABLE $OCF_RESKEY_config_file
+ clog_service_verify $CLOG_FAILED
+ return $OCF_ERR_ARGS
+ fi
+
+ . "$OCF_RESKEY_config_file"
+
+ if [ $? -ne 0 ]; then
+ clog_service_verify $CLOG_FAILED "Error In The File \"$OCF_RESKEY_config_file\""
+ return $OCF_ERR_ARGS
+ fi
+
+ if [ -z "$JAVA_HOME" ]; then
+ clog_service_verify $CLOG_FAILED "JAVA_HOME Not Specified In ${OCF_RESKEY_config_file}"
+ return $OCF_ERR_ARGS;
+ fi
+
+ if [ ! -d "$JAVA_HOME" ]; then
+ clog_service_verify $CLOG_FAILED "JAVA_HOME Does Not Exist"
+ return $OCF_ERR_ARGS;
+ fi
+
+ if [ -z "$JAVA_ENDORSED_DIRS" ]; then
+ clog_service_verify $CLOG_FAILED "JAVA_ENDORSED_DIRS Not Specified In ${OCF_RESKEY_config_file}"
+ return $OCF_ERR_ARGS;
+ fi
+
+ if [ ! -d "$JAVA_ENDORSED_DIRS" ]; then
+ clog_service_verify $CLOG_FAILED "JAVA_ENDORSED_DIRS Does Not Exist"
+ return $OCF_ERR_ARGS;
+ fi
+
+ if [ -z "$CATALINA_HOME" ]; then
+ clog_service_verify $CLOG_FAILED "CATALINA_HOME Not Specified In ${OCF_RESKEY_config_file}"
+ return $OCF_ERR_ARGS;
+ fi
+
+ if [ ! -d "$CATALINA_HOME" ]; then
+ clog_service_verify $CLOG_FAILED "CATALINA_HOME Does Not Exist"
+ return $OCF_ERR_ARGS;
+ fi
+
+ if [ -z "$CATALINA_TMPDIR" ]; then
+ clog_service_verify $CLOG_FAILED "CATALINA_TMPDIR Not Specified In ${OCF_RESKEY_config_file}"
+ return $OCF_ERR_ARGS;
+ fi
+
+ if [ ! -d "$CATALINA_TMPDIR" ]; then
+ clog_service_verify $CLOG_FAILED "CATALINA_TMPDIR Does Not Exist"
+ return $OCF_ERR_ARGS;
+ fi
+
+ if [ -z "$TOMCAT_USER" ]; then
+ clog_service_verify $CLOG_FAILED "TOMCAT_USER Does Not Exist"
+ return $OCF_ERR_ARGS;
+ fi
+
+ clog_service_verify $CLOG_SUCCEED
+
+ return 0
+}
+
+generate_config_file()
+{
+ declare original_file="$1"
+ declare generated_file="$2"
+ declare ip_addresses="$3"
+
+ if [ -f "$generated_file" ]; then
+ sha1_verify "$generated_file"
+ if [ $? -ne 0 ]; then
+ clog_check_sha1 $CLOG_FAILED
+ return 0
+ fi
+ fi
+
+ clog_generate_config $CLOG_INIT "$original_file" "$generated_file"
+
+# generate_configTemplate "$generated_file" "$original_file"
+ $(dirname $0)/utils/tomcat-parse-config.pl $ip_addresses < "$original_file" >> "$generated_file"
+
+ sha1_addToFile "$generated_file"
+ clog_generate_config $CLOG_SUCCEED "$original_file" "$generated_file"
+
+ return 0;
+}
+
+start()
+{
+ declare ccs_fd;
+
+ clog_service_start $CLOG_INIT
+
+ create_pid_directory
+ create_conf_directory "$TOMCAT_conf_dir"
+ check_pid_file "$TOMCAT_pid_file"
+
+ if [ $? -ne 0 ]; then
+ clog_check_pid $CLOG_FAILED "$TOMCAT_pid_file"
+ clog_service_start $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+ clog_looking_for $CLOG_INIT "IP Addresses"
+
+ ccs_fd=$(ccs_connect);
+ if [ $? -ne 0 ]; then
+ clog_looking_for $CLOG_FAILED_CCS
+ return $OCF_ERR_GENERIC
+ fi
+
+ get_service_ip_keys "$ccs_fd" "$OCF_RESKEY_service_name"
+ ip_addresses=`build_ip_list "$ccs_fd"`
+
+ if [ -z "$ip_addresses" ]; then
+ clog_looking_for $CLOG_FAILED_NOT_FOUND "IP Addresses"
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_looking_for $CLOG_SUCCEED "IP Addresses"
+ generate_config_file "$OCF_RESKEY_catalina_base/conf/server.xml" "$TOMCAT_gen_config_file" "$ip_addresses"
+ ln -s "$OCF_RESKEY_catalina_base"/* "$TOMCAT_gen_catalina_base" &> /dev/null
+ ln -s "$OCF_RESKEY_catalina_base"/conf/* "$TOMCAT_gen_catalina_base"/conf &> /dev/null
+
+ CLASSPATH="$JAVA_HOME"/lib/tools.jar:"$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/commons-logging-api.jar:`/usr/bin/build-classpath mx4j/mx4j-impl`:`/usr/bin/build-classpath mx4j/mx4j-jmx`
+
+ sudo -u "$TOMCAT_USER" "$JAVA_HOME/bin/java" $JAVA_OPTS $OCF_RESKEY_catalina_options \
+ -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
+ -Dcatalina.base="$TOMCAT_gen_catalina_base" \
+ -Dcatalina.home="$CATALINA_HOME" \
+ -Djava.io.tmpdir="$CATALINA_TMPDIR" \
+ org.apache.catalina.startup.Bootstrap "$@" start \
+ >> "$TOMCAT_gen_catalina_base"/logs/catalina.out 2>&1 &
+
+
+ if [ $? -ne 0 ]; then
+ clog_service_start $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ if [ -z "$!" ]; then
+ clog_service_start $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ echo $! > $TOMCAT_pid_file
+
+ clog_service_start $CLOG_SUCCEED
+
+ return 0;
+}
+
+stop()
+{
+ clog_service_stop $CLOG_INIT
+
+ stop_generic "$TOMCAT_pid_file" "$OCF_RESKEY_shutdown_wait"
+
+ if [ $? -ne 0 ]; then
+ clog_service_stop $CLOG_FAILED
+ return $OCF_ERR_GENERIC
+ fi
+
+ if [ -e "$TOMCAT_pid_file" ]; then
+ rm -f "$TOMCAT_pid_file"
+ fi
+
+ clog_service_stop $CLOG_SUCCEED
+ return 0;
+}
+
+status()
+{
+ clog_service_status $CLOG_INIT
+
+ status_check_pid "$TOMCAT_pid_file"
+ if [ $? -ne 0 ]; then
+ clog_service_status $CLOG_FAILED "$TOMCAT_pid_file"
+ return $OCF_ERR_GENERIC
+ fi
+
+ clog_service_status $CLOG_SUCCEED
+ return 0
+}
+
+case $1 in
+ meta-data)
+ cat `echo $0 | sed 's/^\(.*\)\.sh$/\1.metadata/'`
+ exit 0
+ ;;
+ verify-all)
+ verify_all
+ exit $?
+ ;;
+ start)
+ verify_all && start
+ exit $?
+ ;;
+ stop)
+ verify_all && stop
+ exit $?
+ ;;
+ status|monitor)
+ verify_all
+ status
+ exit $?
+ ;;
+ restart)
+ verify_all
+ stop
+ start
+ exit $?
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|monitor|restart|meta-data|verify-all}"
+ exit $OCF_ERR_GENERIC
+ ;;
+esac
More information about the Cluster-devel
mailing list