diff -r fd1b907a0de6 configure.in
--- a/configure.in Fri Apr 05 09:42:49 2013 +0200
+++ b/configure.in Sat Nov 30 10:45:24 2013 +0100
@@ -137,10 +137,10 @@
printf "#include <stdio.h>\n" > ${Cfile}.c
printf "#include <%s>\n" $1 >> ${Cfile}.c
printf "int main(int argc, char **argv) { printf(\"%%s\", %s); return 0; }\n" $2 >> ${Cfile}.c
- $CC $CFLAGS ${Cfile}.c -o ${Cfile}
- value=`${Cfile}`
+ value=""
+ $CC $CFLAGS ${Cfile}.c -o ${Cfile} && value=`${Cfile}`
AC_MSG_RESULT($value)
- printf $value
+ printf "%s" $value
rm -f ${Cfile}.c ${Cfile}
}
@@ -417,8 +417,17 @@
AC_SUBST(HA_NOARCHDATAHBDIR)
AC_DEFINE_UNQUOTED(HA_NOARCHDATAHBDIR,"$HA_NOARCHDATAHBDIR", $HB_PKG noarch data directory)
+
HA_LIBHBDIR=`extract_header_define $GLUE_HEADER HA_LIBHBDIR`
AC_SUBST(HA_LIBHBDIR)
+if test x"$HA_LIBHBDIR" = x ; then
+# see rhbz#805147 and
+# https://github.com/davidvossel/pacemaker/commit/44e7ba80e2a259f3b407e2d35cf8353572c6d769
+ AC_MSG_NOTICE($GLUE_HEADER does not define HA_LIBHBDIR, using fallback)
+# FIXME we need to use libexec for daemons, lib is only for shared objects
+ HA_LIBHBDIR="$libdir/heartbeat"
+ AC_DEFINE_UNQUOTED(HA_LIBHBDIR,"$HA_LIBHBDIR", lib and daemon directory)
+fi
HA_VARRUNDIR=`extract_header_define $GLUE_HEADER HA_VARRUNDIR`
AC_SUBST(HA_VARRUNDIR)
diff -r fd1b907a0de6 heartbeat/init.d/heartbeat.in
--- a/heartbeat/init.d/heartbeat.in Fri Apr 05 09:42:49 2013 +0200
+++ b/heartbeat/init.d/heartbeat.in Sat Nov 30 10:45:24 2013 +0100
@@ -44,6 +44,8 @@
# Default-Stop: 0 1 6
### END INIT INFO
+HEARTBEAT=@HA_LIBHBDIR@/heartbeat
+
[ -r @INITDEFDIR@/heartbeat ] && . @INITDEFDIR@/heartbeat
[ -r @INITDEFDIR@/pacemaker ] && . @INITDEFDIR@/pacemaker
[ -r @INITDEFDIR@/sbd ] && . @INITDEFDIR@/sbd
@@ -138,7 +140,7 @@
# Set this to a 1 if you want to automatically load kernel modules
USE_MODULES=@USE_MODULES@
-[ -x $HA_BIN/heartbeat ] || exit 0
+[ -x $HEARTBEAT ] || exit 0
#
# Some environments like it if we use their functions...
@@ -148,7 +150,7 @@
then
# Provide our own versions of these functions
status() {
- $HA_BIN/heartbeat -s
+ $HEARTBEAT -s
}
echo_failure() {
echo " Heartbeat failure [rc=$1]. $rc_failed"
@@ -293,7 +295,7 @@
start_heartbeat() {
if
- ERROR=`$HA_BIN/heartbeat 2>&1`
+ ERROR=`$HEARTBEAT 2>&1`
then
: OK
else
@@ -375,7 +377,7 @@
echo -n "Stopping High-Availability services: "
if
- $HA_BIN/heartbeat -k >/dev/null 2>&1 # Kill it
+ $HEARTBEAT -k >/dev/null 2>&1 # Kill it
then
StopSBD
echo_success
@@ -388,7 +390,7 @@
}
StatusHA() {
- $HA_BIN/heartbeat -s
+ $HEARTBEAT -s
}
StandbyHA() {
@@ -434,7 +436,7 @@
echo -n "Reloading High-Availability services: "
if
- $HA_BIN/heartbeat -r # Restart, and keep your resources
+ $HEARTBEAT -r # Restart, and keep your resources
then
echo_success
return 0