diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-cluster/heartbeat/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-cluster/heartbeat/files')
-rw-r--r-- | sys-cluster/heartbeat/files/3.0.4-docs.patch | 57 | ||||
-rw-r--r-- | sys-cluster/heartbeat/files/3.0.4-fix_configure.patch | 110 | ||||
-rw-r--r-- | sys-cluster/heartbeat/files/3.0.4-python_tests.patch | 29 | ||||
-rw-r--r-- | sys-cluster/heartbeat/files/3.0.5-fix_ucast.patch | 145 | ||||
-rw-r--r-- | sys-cluster/heartbeat/files/3.0.6-configure.patch | 103 | ||||
-rw-r--r-- | sys-cluster/heartbeat/files/3.0.6-docs.patch | 59 | ||||
-rw-r--r-- | sys-cluster/heartbeat/files/heartbeat-init | 92 |
7 files changed, 595 insertions, 0 deletions
diff --git a/sys-cluster/heartbeat/files/3.0.4-docs.patch b/sys-cluster/heartbeat/files/3.0.4-docs.patch new file mode 100644 index 000000000000..a558dd36f5a3 --- /dev/null +++ b/sys-cluster/heartbeat/files/3.0.4-docs.patch @@ -0,0 +1,57 @@ +--- a/configure.in ++++ b/configure.in +@@ -505,8 +505,15 @@ + AC_PATH_PROGS(TEST, test) + AC_PATH_PROGS(PKGCONFIG, pkg-config) + +-dnl xsltproc is required for building the man pages +-AC_PATH_PROGS(XSLTPROC, xsltproc) ++AC_ARG_ENABLE([doc], ++ AS_HELP_STRING([--enable-doc],[Build documentation] ++)) ++AS_IF([test "x$enable_doc" = "xyes"], [ ++ AC_PATH_PROGS(XSLTPROC, xsltproc) ++]) ++AM_CONDITIONAL([BUILD_DOC], [test "x$enable_doc" = "xyes"] ) ++AC_SUBST(XSLTPROC) ++ + + dnl ************************************************************************ + dnl Check whether non-root user can chown. +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -33,11 +33,12 @@ + + doc_DATA = $(OTHER_DOCS) + ++if BUILD_DOC + man_MANS = heartbeat.8 apphbd.8 cl_status.1 \ + hb_standby.1 hb_takeover.1 hb_addnode.1 hb_delnode.1 \ + ha.cf.5 authkeys.5 + +-STYLESHEET_PREFIX ?= http://docbook.sourceforge.net/release/xsl/current ++STYLESHEET_PREFIX ?= /usr/share/sgml/docbook/xsl-stylesheets + MANPAGES_STYLESHEET ?= $(STYLESHEET_PREFIX)/manpages/docbook.xsl + HTML_STYLESHEET ?= $(STYLESHEET_PREFIX)/xhtml/docbook.xsl + FO_STYLESHEET ?= $(STYLESHEET_PREFIX)/fo/docbook.xsl +@@ -47,6 +48,12 @@ + XSLTPROC_HTML_OPTIONS ?= $(XSLTPROC_OPTIONS) + XSLTPROC_FO_OPTIONS ?= $(XSLTPROC_OPTIONS) + ++%.5 %.8 %.1: %.xml ++ $(XSLTPROC) \ ++ $(XSLTPROC_MANPAGES_OPTIONS) \ ++ $(MANPAGES_STYLESHEET) $< ++endif ++ + EXTRA_DIST = $(txtfiles) $(htmlfiles) $(man_MANS) $(OTHER_DOCS) + + ChangeLog: $(SPECSRC) +@@ -56,7 +63,3 @@ + .html.txt: + if [ "X$(HTML2TXT)" = "X" ]; then echo "Lynx or w3m or user-defined HTML2TXT required to convert $< to $@" >$@ ; else $(HTML2TXT) -dump $< >$@ ; fi + +-%.5 %.8 %.1: %.xml +- $(XSLTPROC) \ +- $(XSLTPROC_MANPAGES_OPTIONS) \ +- $(MANPAGES_STYLESHEET) $< diff --git a/sys-cluster/heartbeat/files/3.0.4-fix_configure.patch b/sys-cluster/heartbeat/files/3.0.4-fix_configure.patch new file mode 100644 index 000000000000..1df22b337c5a --- /dev/null +++ b/sys-cluster/heartbeat/files/3.0.4-fix_configure.patch @@ -0,0 +1,110 @@ +--- Heartbeat-3-0-STABLE-3.0.4/configure.in 2010-12-09 21:09:47.000000000 +0100 ++++ Heartbeat-3-0-STABLE-3.0.4/configure.in 2010-12-28 17:37:45.080773140 +0100 +@@ -243,9 +243,9 @@ + mandir=`var "$mandir" "$exec_prefix/man"` + dnl docdir is available in autoconf 2.60+, for older versions preseed + dnl with the same value that 2.60+ uses +-docdir=`var "$docdir" "${datadir}/doc/${PACKAGE_NAME}"` +-libdir=`var "$libdir" "$exec_prefix/lib"` +-libexecdir=`var "$libexecdir" "$exec_prefix/libexec"` ++dnl docdir=`var "$docdir" "${datadir}/doc/${PACKAGE_NAME}"` ++dnl libdir=`var "$libdir" "$exec_prefix/lib"` ++dnl libexecdir=`var "$libexecdir" "$exec_prefix/libexec"` + noarchlibdir=`var "$noarchlibdir" "$prefix/lib"` + + +@@ -284,59 +284,11 @@ + LIBC=`${LDD} ${tmpOutfile} | grep libc | sed -e 's%.*=> *%%' -e 's% .*$%%'` + LibCdir=`dirname $LIBC` + dirlist=`echo $LibCdir | tr '/' ' '` +- LibDirSuffix=unknown +- for dir in $dirlist +- do +- case $dir in +- *lib*) LibDirSuffix=$dir; break;; +- *);; +- esac +- done +- case $LibDirSuffix in +- unknown) LibDirSuffix=`basename $LibCdir`;; +- esac + OutFileType=`file $tmpOutfile` + rm -f $tmpCfile $tmpOutfile + else + AC_MSG_ERROR([Cannot Compile trivial C program]) + fi +-# +-# The code above doesn't work right everywhere +-# (like Fedora and OpenBSD) +-# +-case ${LibDirSuffix} in +- *lib*) : Cool;; +- *) : Sigh... +- case $OutFileType in +- *64-bit*) +- case $host_os in +- openbsd*) LibDirSuffix=lib;; +- *) LibDirSuffix=lib64;; +- esac;; +- *32-bit*) LibDirSuffix=lib;; +- *) LibDirSuffix=lib;; +- esac;; +-esac +-# +-# This may not yet be quite right for PPC where the default +-# is to produce 32-bit binaries, even though the OS is 64-bit +-# or for that matter for system Z, But, it's a lot better than +-# it used to be. +-# +-AC_MSG_RESULT($LibDirSuffix) +- +-case $libdir in +- */*${LibDirSuffix}) : Cool ;; +- *) : Uh Oh... +- libdir=`dirname $libdir`/$LibDirSuffix +- AC_MSG_WARN([Overriding libdir to: $libdir]);; +-esac +-case $libexecdir in +- */$LibDirSuffix) : Cool ;; +- *) : Uh Oh... +- libexecdir=`dirname $libexecdir`/$LibDirSuffix +- AC_MSG_WARN([Overriding libexecdir to: $libexecdir]);; +-esac + + for j in exec_prefix bindir sbindir datadir sysconfdir localstatedir \ + includedir oldincludedir mandir docdir stdocdir libdir noarchlibdir +@@ -386,7 +338,6 @@ + fi + + AC_CHECK_HEADERS(heartbeat/glue_config.h) +-GLUE_HEADER=none + if test "$ac_cv_header_heartbeat_glue_config_h" = "yes"; then + GLUE_HEADER=heartbeat/glue_config.h + else +@@ -453,15 +404,6 @@ + + dnl We use this in the RPM specfile... + AC_SUBST(ac_configure_args) +-cleaned_configure_args="" +-for j in ${ac_configure_args} +-do +- case $j in +- *--libdir=*|*--libexecdir=*) ;; +- *) cleaned_configure_args="$cleaned_configure_args $j";; +- esac +-done +-AC_SUBST(cleaned_configure_args) + + dnl ************************************************************************* + PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin" +--- Heartbeat-3-0-STABLE-3.0.5/configure.in 2011-12-28 11:51:05.601673071 +0100 ++++ Heartbeat-3-0-STABLE-3.0.5/configure.in 2011-12-28 11:54:34.223094385 +0100 +@@ -2002,7 +2002,7 @@ + fi + + if test "$GCC" = yes; then +- CFLAGS="$CFLAGS -ggdb3" ++ CFLAGS="$CFLAGS" + if + cc_supports_flag -funsigned-char + then diff --git a/sys-cluster/heartbeat/files/3.0.4-python_tests.patch b/sys-cluster/heartbeat/files/3.0.4-python_tests.patch new file mode 100644 index 000000000000..e6e1071573a9 --- /dev/null +++ b/sys-cluster/heartbeat/files/3.0.4-python_tests.patch @@ -0,0 +1,29 @@ +--- a/cts/Makefile.am ++++ b/cts/Makefile.am +@@ -21,7 +21,7 @@ + + ctsdir = @HA_NOARCHDATAHBDIR@/cts + +-cts_PYTHON = \ ++cts_SCRIPTS = \ + CM_fs.py \ + CM_hb.py \ + CM_LinuxHAv2.py \ +@@ -32,14 +32,12 @@ + extracttests.py \ + getpeinputs.sh \ + OCFIPraTest.py \ +- CIB.py ++ CIB.py \ ++ CTSproxy.py \ ++ LSBDummy + + cts_DATA = README + +-cts_SCRIPTS = \ +- CTSproxy.py \ +- getpeinputs.sh \ +- LSBDummy + + all-local: $(cts_PYTHON) + diff --git a/sys-cluster/heartbeat/files/3.0.5-fix_ucast.patch b/sys-cluster/heartbeat/files/3.0.5-fix_ucast.patch new file mode 100644 index 000000000000..3bec9c89dd86 --- /dev/null +++ b/sys-cluster/heartbeat/files/3.0.5-fix_ucast.patch @@ -0,0 +1,145 @@ + +# HG changeset patch +# User Lars Ellenberg <lars@linbit.com> +# Date 1392200751 -3600 +# Node ID 37f57a36a2dd1abf8461a9b758e62f6fe7a22f77 +# Parent 6d4324633600dc7ae7aa08c56d86c2fcc767977f +Medium: fix usage of SO_REUSEPORT in ucast sockets + +Linux learned SO_REUSEPORT only with kernel 3.9, +but some linux headers already define SO_REUSEPORT. +Which, on older kernels, will result in ENOPROTOOPT, +"Protocol not available". + +Failure to set SO_REUSEPORT is NOT critical in general. +It *may* be a problem on certain BSDs, +with more than two nodes, all using ucast. + +Refusing to start because of failure to set SO_REUSEPORT is +not helpful for the vast majority of the clusters out there. + +While at it, downgrade "critical" log messages to warnings +in non-fatal situations. + +--- a/lib/plugins/HBcomm/ucast.c ++++ b/lib/plugins/HBcomm/ucast.c +@@ -461,12 +461,6 @@ static int HB_make_send_sock(struct hb_m + int sockfd; + struct ip_private *ei; + int tos; +-#if defined(SO_BINDTODEVICE) +- struct ifreq i; +-#endif +-#if defined(SO_REUSEPORT) +- int i = 1; +-#endif + + UCASTASSERT(mp); + ei = (struct ip_private*)mp->pd; +@@ -494,6 +488,7 @@ static int HB_make_send_sock(struct hb_m + + #if defined(SO_BINDTODEVICE) + { ++ struct ifreq i; + /* + * We want to send out this particular interface + * +@@ -515,12 +510,13 @@ static int HB_make_send_sock(struct hb_m + #endif + #if defined(SO_REUSEPORT) + { ++ int one = 1; + /* this is for OpenBSD to allow multiple * + * ucast connections, e.g. a more than * + * two node cluster */ + + if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEPORT, +- &i, sizeof(i)) == -1) { ++ &one, sizeof(one)) == -1) { + PILCallLog(LOG, PIL_CRIT, + "ucast: error setting option SO_REUSEPORT(w): %s", strerror(errno)); + close(sockfd); +@@ -548,7 +544,7 @@ static int HB_make_receive_sock(struct h + int sockfd; + int bindtries; + int boundyet = 0; +- int j; ++ int one = 1; + + UCASTASSERT(mp); + ei = (struct ip_private*)mp->pd; +@@ -563,22 +559,19 @@ static int HB_make_receive_sock(struct h + strerror(errno)); + return -1; + } +- /* +- * Set SO_REUSEADDR on the server socket s. Variable j is used +- * as a scratch varable. +- * +- * 16th February 2000 +- * Added by Horms <horms@vergenet.net> +- * with thanks to Clinton Work <work@scripty.com> +- */ +- j = 1; ++ /* ++ * Set SO_REUSEADDR on the server socket s. ++ * Below, also try to set SO_REUSEPORT, ++ * if known and supported. ++ */ + if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, +- (void *)&j, sizeof j) < 0) { ++ &one, sizeof(one)) < 0) { + /* Ignore it. It will almost always be OK anyway. */ +- PILCallLog(LOG, PIL_CRIT, ++ PILCallLog(LOG, PIL_WARN, + "ucast: error setting socket option SO_REUSEADDR: %s", + strerror(errno)); +- } ++ } else ++ PILCallLog(LOG, PIL_INFO, "ucast: set SO_REUSEADDR"); + #if defined(SO_BINDTODEVICE) + { + /* +@@ -600,20 +593,32 @@ static int HB_make_receive_sock(struct h + } + #endif + #if defined(SO_REUSEPORT) +- { ++ /* ++ * Needed for OpenBSD for more than two nodes in a ucast cluster ++ */ ++ if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEPORT, ++ &one, sizeof(one)) == -1) { + /* +- * Needed for OpenBSD for more than two nodes in a ucast cluster ++ * Linux learned SO_REUSEPORT only with kernel 3.9, ++ * but some linux headers already define SO_REUSEPORT. ++ * Which will result in ENOPROTOOPT, "Protocol not available" ++ * on older kernels. ++ * Failure to set SO_REUSEPORT is NOT critical in general. ++ * It *may* be a problem on certain BSDs with more than ++ * two nodes all using ucast. ++ * Refusing to start because of failure to set SO_REUSEPORT is ++ * not helpful for the vast majority of the clusters out there. + */ +- int i = 1; +- if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEPORT, +- &i, sizeof(i)) == -1) { ++ if (errno == ENOPROTOOPT) { ++ PILCallLog(LOG, PIL_WARN, ++ "ucast: error setting option SO_REUSEPORT: %s", strerror(errno)); ++ } else { + PILCallLog(LOG, PIL_CRIT, +- "ucast: error setting option SO_REUSEPORT(r) %s", strerror(errno)); +- close(sockfd); ++ "ucast: error setting option SO_REUSEPORT: %s", strerror(errno)); + return -1; + } +- PILCallLog(LOG, PIL_INFO, "ucast: set SO_REUSEPORT(w)"); +- } ++ } else ++ PILCallLog(LOG, PIL_INFO, "ucast: set SO_REUSEPORT"); + #endif + + /* Try binding a few times before giving up */ + diff --git a/sys-cluster/heartbeat/files/3.0.6-configure.patch b/sys-cluster/heartbeat/files/3.0.6-configure.patch new file mode 100644 index 000000000000..36054dd23d3b --- /dev/null +++ b/sys-cluster/heartbeat/files/3.0.6-configure.patch @@ -0,0 +1,103 @@ +diff -ru a/configure.ac b/configure.ac +--- a/configure.ac 2015-02-04 15:57:04.000000000 +0100 ++++ b/configure.ac 2017-04-25 13:33:58.668521006 +0200 +@@ -243,9 +243,9 @@ + mandir=`var "$mandir" "$exec_prefix/man"` + dnl docdir is available in autoconf 2.60+, for older versions preseed + dnl with the same value that 2.60+ uses +-docdir=`var "$docdir" "${datadir}/doc/${HB_PKG}"` +-libdir=`var "$libdir" "$exec_prefix/lib"` +-libexecdir=`var "$libexecdir" "$exec_prefix/libexec"` ++dnl docdir=`var "$docdir" "${datadir}/doc/${PACKAGE_NAME}"` ++dnl libdir=`var "$libdir" "$exec_prefix/lib"` ++dnl libexecdir=`var "$libexecdir" "$exec_prefix/libexec"` + noarchlibdir=`var "$noarchlibdir" "$prefix/lib"` + + +@@ -284,53 +284,12 @@ + LIBC=`${LDD} ${tmpOutfile} | grep libc | sed -e 's%.*=> *%%' -e 's% .*$%%'` + LibCdir=`dirname $LIBC` + dirlist=`echo $LibCdir | tr '/' ' '` +- LibDirSuffix=unknown +- for dir in $dirlist +- do +- case $dir in +- *lib*) LibDirSuffix=$dir; break;; +- *);; +- esac +- done +- case $LibDirSuffix in +- unknown) LibDirSuffix=`basename $LibCdir`;; +- esac + OutFileType=`file $tmpOutfile` + rm -f $tmpCfile $tmpOutfile + else + AC_MSG_ERROR([Cannot Compile trivial C program]) + fi +-# +-# The code above doesn't work right everywhere +-# (like Fedora and OpenBSD) +-# +-case ${LibDirSuffix} in +- *lib*) : Cool;; +- *) : Sigh... +- case $OutFileType in +- *64-bit*) +- case $host_os in +- openbsd*) LibDirSuffix=lib;; +- *) LibDirSuffix=lib64;; +- esac;; +- *32-bit*) LibDirSuffix=lib;; +- *) LibDirSuffix=lib;; +- esac;; +-esac +-# +-# This may not yet be quite right for PPC where the default +-# is to produce 32-bit binaries, even though the OS is 64-bit +-# or for that matter for system Z, But, it's a lot better than +-# it used to be. +-# +-AC_MSG_RESULT($LibDirSuffix) + +-case $libdir in +- */*${LibDirSuffix}) : Cool ;; +- *) : Uh Oh... +- libdir=`dirname $libdir`/$LibDirSuffix +- AC_MSG_WARN([Overriding libdir to: $libdir]);; +-esac + for j in exec_prefix bindir sbindir datadir sysconfdir localstatedir \ + includedir oldincludedir mandir docdir stdocdir libdir noarchlibdir + do +@@ -379,7 +338,6 @@ + fi + + AC_CHECK_HEADERS(heartbeat/glue_config.h) +-GLUE_HEADER=none + if test "$ac_cv_header_heartbeat_glue_config_h" = "yes"; then + GLUE_HEADER=heartbeat/glue_config.h + else +@@ -463,15 +421,6 @@ + + dnl We use this in the RPM specfile... + AC_SUBST(ac_configure_args) +-cleaned_configure_args="" +-for j in ${ac_configure_args} +-do +- case $j in +- *--libdir=*|*--libexecdir=*) ;; +- *) cleaned_configure_args="$cleaned_configure_args $j";; +- esac +-done +-AC_SUBST(cleaned_configure_args) + + dnl ************************************************************************* + PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin" +@@ -2087,7 +2036,7 @@ + fi + + if test "$GCC" = yes; then +- CFLAGS="$CFLAGS -ggdb3" ++ CFLAGS="$CFLAGS" + if + cc_supports_flag -funsigned-char + then diff --git a/sys-cluster/heartbeat/files/3.0.6-docs.patch b/sys-cluster/heartbeat/files/3.0.6-docs.patch new file mode 100644 index 000000000000..7c5c9573109f --- /dev/null +++ b/sys-cluster/heartbeat/files/3.0.6-docs.patch @@ -0,0 +1,59 @@ +diff -ru a/configure.ac b/configure.ac +--- a/configure.ac 2015-02-04 15:57:04.000000000 +0100 ++++ b/configure.ac 2017-04-25 11:57:33.706753890 +0200 +@@ -574,8 +574,14 @@ + AC_PATH_PROGS(TEST, test) + PKG_PROG_PKG_CONFIG + +-dnl xsltproc is required for building the man pages +-AC_PATH_PROGS(XSLTPROC, xsltproc) ++AC_ARG_ENABLE([doc], ++ AS_HELP_STRING([--enable-doc],[Build documentation] ++)) ++AS_IF([test "x$enable_doc" = "xyes"], [ ++ AC_PATH_PROGS(XSLTPROC, xsltproc) ++]) ++AM_CONDITIONAL([BUILD_DOC], [test "x$enable_doc" = "xyes"] ) ++AC_SUBST(XSLTPROC) + + dnl ************************************************************************ + dnl Check whether non-root user can chown. +diff -ru a/doc/Makefile.am b/doc/Makefile.am +--- a/doc/Makefile.am 2015-02-04 15:57:04.000000000 +0100 ++++ b/doc/Makefile.am 2017-04-25 11:58:35.459257834 +0200 +@@ -33,11 +33,12 @@ + + doc_DATA = $(OTHER_DOCS) + ++if BUILD_DOC + man_MANS = heartbeat.8 apphbd.8 cl_status.1 \ + hb_standby.1 hb_takeover.1 hb_addnode.1 hb_delnode.1 \ + ha.cf.5 authkeys.5 + +-STYLESHEET_PREFIX ?= http://docbook.sourceforge.net/release/xsl/current ++STYLESHEET_PREFIX ?= /usr/share/sgml/docbook/xsl-stylesheets + MANPAGES_STYLESHEET ?= $(STYLESHEET_PREFIX)/manpages/docbook.xsl + HTML_STYLESHEET ?= $(STYLESHEET_PREFIX)/xhtml/docbook.xsl + FO_STYLESHEET ?= $(STYLESHEET_PREFIX)/fo/docbook.xsl +@@ -47,6 +48,12 @@ + XSLTPROC_HTML_OPTIONS ?= $(XSLTPROC_OPTIONS) + XSLTPROC_FO_OPTIONS ?= $(XSLTPROC_OPTIONS) + ++%.5 %.8 %.1: %.xml ++ $(XSLTPROC) \ ++ $(XSLTPROC_MANPAGES_OPTIONS) \ ++ $(MANPAGES_STYLESHEET) $< ++endif ++ + EXTRA_DIST = $(txtfiles) $(htmlfiles) $(man_MANS) $(OTHER_DOCS) + + ChangeLog: $(SPECSRC) +@@ -55,8 +62,3 @@ + + .html.txt: + if [ "X$(HTML2TXT)" = "X" ]; then echo "Lynx or w3m or user-defined HTML2TXT required to convert $< to $@" >$@ ; else $(HTML2TXT) -dump $< >$@ ; fi +- +-%.5 %.8 %.1: %.xml +- $(XSLTPROC) \ +- $(XSLTPROC_MANPAGES_OPTIONS) \ +- $(MANPAGES_STYLESHEET) $< diff --git a/sys-cluster/heartbeat/files/heartbeat-init b/sys-cluster/heartbeat/files/heartbeat-init new file mode 100644 index 000000000000..9316fcc81e8f --- /dev/null +++ b/sys-cluster/heartbeat/files/heartbeat-init @@ -0,0 +1,92 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +HA_DIR=/etc/ha.d +. $HA_DIR/shellfuncs + +depend() { + use logger + need net +} + +opts="start stop status reload restart" + +CheckBool() { + case `echo "$1" | tr A-Z a-z` in + y|yes|enable|on|true|1) true;; + *) false;; + esac +} + +# Run pre-startup script if it exists +RunStartStop() { + [ -f $HA_DIR/resource.d/startstop ] && $HA_DIR/resource.d/startstop "$@" +} + +start() { + checkpath -q -d -m 0755 -o root:root /var/run/heartbeat + + ebegin "Starting heartbeat" + + . $HA_DIR/shellfuncs + + # start the log subsystem + CheckBool "`ha_parameter use_logd`" && \ + ( /usr/lib/heartbeat/ha_logd -s &>/dev/null || \ + /usr/lib/heartbeat/ha_logd -d -c /etc/ha.d/ha_logd.cf) + + RunStartStop pre-start + + CheckBool "`ha_parameter crm`" || \ + /usr/lib/heartbeat/ResourceManager verifyallidle + + /usr/lib/heartbeat/heartbeat &>/dev/null + ret=$? + + RunStartStop post-start + + eend ${ret} +} + +stop() { + ebegin "Stopping heartbeat" + + RunStartStop pre-stop + + /usr/lib/heartbeat/heartbeat -k &>/dev/null + ret=$? + + RunStartStop post-stop ${ret} + + # stop log subsystem + CheckBool "`ha_parameter use_logd`" && \ + ( /usr/lib/heartbeat/ha_logd -s &>/dev/null && \ + /usr/lib/heartbeat/ha_logd -k &>/dev/null ) + + eend ${ret} +} + +status() { + /usr/lib/heartbeat/heartbeat -s +} + +reload() { + ebegin "Reloading heartbeat" + /usr/lib/heartbeat/heartbeat -r &>/dev/null + eend $? +} + +restart() { + . $HA_DIR/shellfuncs + + sleeptime=$(( `ha_parameter deadtime` + 10 )) + + svc_stop + + ebegin " waiting ${sleeptime}s to allow resource takeover to complete" + sleep ${sleeptime} + eend 0 + + svc_start +} |