1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-22 08:58:47 +00:00

- Add heartbeat 1.2.3, a Subsystem for High-Availability Clustering.

PR:		ports/79537
Submitted by:	Scott Kleihege <scott-ports@tummy.com>
This commit is contained in:
Florent Thoumie 2005-04-06 07:36:41 +00:00
parent 907633217b
commit 1ac80d09cf
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=132613
11 changed files with 1029 additions and 0 deletions

View File

@ -202,6 +202,7 @@
SUBDIR += hammerhead
SUBDIR += hdup
SUBDIR += healthd
SUBDIR += heartbeat
SUBDIR += heirloom
SUBDIR += hourglass
SUBDIR += httplog

View File

@ -0,0 +1,45 @@
# New ports collection makefile for: hearbeat
# Date created: 18 March 2005
# Whom: Scott Kleihege <scott-ports@tummy.com>
#
# $FreeBSD$
#
PORTNAME= heartbeat
PORTVERSION= 1.2.3
CATEGORIES= sysutils
MASTER_SITES= http://linux-ha.org/download/
MAINTAINER= scott-ports@tummy.com
COMMENT= Subsystem for High-Availability Clustering
BUILD_DEPENDS= ${LOCALBASE}/include/libnet.h:${PORTSDIR}/net/libnet-devel
USE_PERL5= yes
USE_GMAKE= yes
USE_GNOME= glib12
INSTALLS_SHLIB= yes
GNU_CONFIGURE= yes
USE_INC_LIBTOOL_VER= 13
USE_REINPLACE= yes
CONFIGURE_ARGS= --disable-fatal-warnings
SUB_FILES= pkg-install
PKGDEINSTALL= ${PKGINSTALL}
MAN1= cl_status.1
MAN8= apphbd.8 heartbeat.8 ldirectord.8 meatclient.8 \
stonith.8 supervise-ldirectord-config.8
post-patch:
${REINPLACE_CMD} -e "s#logrotate.d##" ${WRKSRC}/heartbeat/Makefile.in \
${WRKSRC}/ldirectord/Makefile.in
post-deinstall:
@${SH} ${PKGINSTALL} ${PKGNAME} DEINSTALL
post-install:
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
MD5 (heartbeat-1.2.3.tar.gz) = 9fd126e5dff51cc8c1eee223c252a4af
SIZE (heartbeat-1.2.3.tar.gz) = 1772513

View File

@ -0,0 +1,174 @@
#! /bin/sh
base=%%PREFIX%%
ask() {
local question default answer
question=$1
default=$2
if [ -z "${PACKAGE_BUILDING}" ]; then
read -p "${question} [${default}]? " answer
fi
if [ x${answer} = x ]; then
answer=${default}
fi
echo ${answer}
}
yesno() {
local dflt question answer
question=$1
dflt=$2
while :; do
answer=$(ask "${question}" "${dflt}")
case "${answer}" in
[Yy]*) return 0;;
[Nn]*) return 1;;
esac
echo "Please answer yes or no."
done
}
make_account() {
local u g gcos homeopt home
u=$1
g=$2
gcos=$3
homeopt=${4:+"-d $4"}
if pw group show "${g}" >/dev/null 2>&1; then
echo "You already have a group \"${g}\", so I will use it."
else
echo "You need a group \"${g}\"."
if which -s pw && yesno "Would you like me to create it" y; then
pw groupadd ${g} || exit
echo "Done."
else
echo "Please create it, and try again."
if ! grep -q "^${u}:" /etc/passwd; then
echo "While you're at it, please create a user \"${u}\" too,"
echo "with a default group of \"${g}\"."
fi
exit 1
fi
fi
if pw user show "${u}" >/dev/null 2>&1; then
echo "You already have a user \"${u}\", so I will use it."
else
echo "You need a user \"${u}\"."
if which -s pw && yesno "Would you like me to create it" y; then
pw useradd ${u} -g ${g} -h - ${homeopt} \
-s /nonexistent -c "${gcos}" || exit
echo "Done."
else
echo "Please create it, and try again."
exit 1
fi
fi
if [ x"$homeopt" = x ]; then
eval home=~${u}
if [ ! -d "${home}" ]; then
if yesno \
"Would you like me to create ${u}'s home directory (${home})" y
then
mkdir -p ${home} || exit
chown -R ${u}:${g} ${home} || exit
chmod -R go= ${home} || exit
else
echo "Please create it, and try again."
exit 1
fi
fi
fi
}
delete_account() {
local u g home
u=$1
g=$2
if yesno "Do you want me to remove group \"${g}\"" y; then
pw groupdel -n ${g}
echo "Done."
fi
if yesno "Do you want me to remove user \"${u}\"" y; then
eval home=~${u}
pw userdel -n ${u}
echo "Done."
if [ -d "${home}" ]; then
echo "Please remember to remove the home directory \"${home}\" as"
echo "well as the mirrored files."
fi
fi
}
case $2 in
POST-INSTALL)
if which -s pw && which -s lockf; then
:
else
cat <<EOF
This system looks like a pre-2.2 version of FreeBSD. I see that it
is missing the "lockf" and/or "pw" utilities. I need these utilities.
Please get them and install them, and try again. You can get the
sources from:
ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.bin/lockf.tar.gz
ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.sbin/pw.tar.gz
EOF
exit 1
fi
echo ""
user=hacluster
group=haclient
make_account ${user} ${group} "${user} ${group}" "/nonexistent"
echo "Adding empty dirs and pid file."
test -d /var/lib/heartbeat/ckpt || \
install -d -m 755 /var/lib/heartbeat/ckpt
test -d /var/lib/heartbeat/ccm || \
install -d -m 755 /var/lib/heartbeat/ccm
test -d /var/lock/subsys || \
install -d -m 755 /var/lock/subsys
test -d ${base}/etc/ha.d/conf || \
install -d -m 755 ${base}/etc/ha.d/conf
test -f /var/run/heartbeat.pid || \
install -m 644 -o ${user} -g ${group} /dev/null \
/var/run/heartbeat.pid
;;
DEINSTALL)
if ps -axc | grep -q heartbeat; then
if yesno "There are some heartbeat processes running. Shall I kill them" y
then
killall heartbeat
sleep 2
else
echo "OK ... I hope you know what you are doing."
fi
fi
delete_account hacluster haclient
echo "Removing runtime files"
if [ -d /var/lib/heartbeat ]; then
rm -r /var/lib/heartbeat
fi
if [ -f /var/lock/subsys/heartbeat ]; then
rm /var/lock/subsys/heartbeat
fi
if [ -f /var/run/heartbeat.pid ]; then
rm /var/run/heartbeat.pid
fi
;;
esac

View File

@ -0,0 +1,24 @@
heartbeat is a basic high-availability subsystem. It will run
scripts at initialization, and when machines go up or down. This
version will also perform IP address takeover using gratuitous ARPs.
It implements the following kinds of heartbeats:
- Bidirectional Serial Rings ("raw" serial ports)
- UDP/IP broadcast (ethernet, etc)
- Unicast heartbeats
- "ping" heartbeats (for routers, switches, etc.)
(to be used for breaking ties in 2-node systems)
ldirectord is a stand-alone daemon to monitor services.
The STONITH module (a.k.a. STOMITH) provides an extensible interface
for remotely powering down a node in the cluster.
PILS is an generalized and portable open source Plugin and Interface
Loading System. PILS manages both plugins (loadable objects), and
the interfaces these plugins implement. PILS is designed to support
any number of plugins implementing any number of interfaces.
WWW: http://linux-ha.org/
Scott Kleihege <scott-ports@tummy.com>

View File

@ -0,0 +1,269 @@
bin/cl_status
etc/ha.d/README.config
etc/ha.d/harc
etc/ha.d/rc.d/ask_resources
etc/ha.d/rc.d/hb_takeover
etc/ha.d/rc.d/ip-request
etc/ha.d/rc.d/ip-request-resp
etc/ha.d/rc.d/status
etc/ha.d/resource.d/AudibleAlarm
etc/ha.d/resource.d/Delay
etc/ha.d/resource.d/Filesystem
etc/ha.d/resource.d/ICP
etc/ha.d/resource.d/IPaddr
etc/ha.d/resource.d/IPaddr2
etc/ha.d/resource.d/IPsrcaddr
etc/ha.d/resource.d/LVM
etc/ha.d/resource.d/LinuxSCSI
etc/ha.d/resource.d/MailTo
etc/ha.d/resource.d/OCF
etc/ha.d/resource.d/Raid1
etc/ha.d/resource.d/SendArp
etc/ha.d/resource.d/ServeRAID
etc/ha.d/resource.d/WAS
etc/ha.d/resource.d/WinPopup
etc/ha.d/resource.d/Xinetd
etc/ha.d/resource.d/apache
etc/ha.d/resource.d/db2
etc/ha.d/resource.d/portblock
etc/ha.d/shellfuncs
etc/rc.d/heartbeat.sh
etc/rc.d/ldirectord.sh
include/clplumbing/GSource.h
include/clplumbing/Gmain_timeout.h
include/clplumbing/apphb_cs.h
include/clplumbing/base64.h
include/clplumbing/cl_log.h
include/clplumbing/cl_malloc.h
include/clplumbing/cl_poll.h
include/clplumbing/cl_signal.h
include/clplumbing/cpulimits.h
include/clplumbing/ipc.h
include/clplumbing/loggingdaemon.h
include/clplumbing/longclock.h
include/clplumbing/lsb_exitcodes.h
include/clplumbing/mkstemp_mode.h
include/clplumbing/netstring.h
include/clplumbing/proctrack.h
include/clplumbing/realtime.h
include/clplumbing/recoverymgr_cs.h
include/clplumbing/timers.h
include/clplumbing/ttylock.h
include/clplumbing/uids.h
include/heartbeat/HBauth.h
include/heartbeat/HBcomm.h
include/heartbeat/apphb.h
include/heartbeat/apphb_notify.h
include/heartbeat/ha_config.h
include/heartbeat/ha_msg.h
include/heartbeat/hb_api.h
include/heartbeat/heartbeat.h
include/heartbeat/recoverymgr.h
include/ocf/oc_event.h
include/ocf/oc_membership.h
include/pils/generic.h
include/pils/interface.h
include/pils/plugin.h
include/saf/ais.h
include/saf/ais_amf.h
include/saf/ais_base.h
include/saf/ais_checkpoint.h
include/saf/ais_event.h
include/saf/ais_lock.h
include/saf/ais_membership.h
include/saf/ais_message.h
include/stonith/expect.h
include/stonith/stonith.h
lib/heartbeat/BasicSanityCheck
lib/heartbeat/ResourceManager
lib/heartbeat/TestHeartbeatComm
lib/heartbeat/api_test
lib/heartbeat/apphbd
lib/heartbeat/apphbtest
lib/heartbeat/ccm
lib/heartbeat/ccm_testclient
lib/heartbeat/checkpointd
lib/heartbeat/ckpttest
lib/heartbeat/clmtest
lib/heartbeat/cts/CM_fs.py
lib/heartbeat/cts/CM_hb.py
lib/heartbeat/cts/CTS.py
lib/heartbeat/cts/CTSaudits.py
lib/heartbeat/cts/CTSlab.py
lib/heartbeat/cts/CTStests.py
lib/heartbeat/cts/README
lib/heartbeat/findif
lib/heartbeat/ha_config
lib/heartbeat/hb_standby
lib/heartbeat/hb_takeover
lib/heartbeat/heartbeat
lib/heartbeat/ipctest
lib/heartbeat/ipctransientclient
lib/heartbeat/ipctransientserver
lib/heartbeat/ipfail
lib/heartbeat/mach_down
lib/heartbeat/plugins/AppHBNotification/recmgr.a
lib/heartbeat/plugins/AppHBNotification/recmgr.la
lib/heartbeat/plugins/AppHBNotification/recmgr.so
lib/heartbeat/plugins/HBauth/crc.a
lib/heartbeat/plugins/HBauth/crc.la
lib/heartbeat/plugins/HBauth/crc.so
lib/heartbeat/plugins/HBauth/md5.a
lib/heartbeat/plugins/HBauth/md5.la
lib/heartbeat/plugins/HBauth/md5.so
lib/heartbeat/plugins/HBauth/sha1.a
lib/heartbeat/plugins/HBauth/sha1.la
lib/heartbeat/plugins/HBauth/sha1.so
lib/heartbeat/plugins/HBcomm/bcast.a
lib/heartbeat/plugins/HBcomm/bcast.la
lib/heartbeat/plugins/HBcomm/bcast.so
lib/heartbeat/plugins/HBcomm/mcast.a
lib/heartbeat/plugins/HBcomm/mcast.la
lib/heartbeat/plugins/HBcomm/mcast.so
lib/heartbeat/plugins/HBcomm/ping.a
lib/heartbeat/plugins/HBcomm/ping.la
lib/heartbeat/plugins/HBcomm/ping.so
lib/heartbeat/plugins/HBcomm/ping_group.a
lib/heartbeat/plugins/HBcomm/ping_group.la
lib/heartbeat/plugins/HBcomm/ping_group.so
lib/heartbeat/plugins/HBcomm/serial.a
lib/heartbeat/plugins/HBcomm/serial.la
lib/heartbeat/plugins/HBcomm/serial.so
lib/heartbeat/plugins/HBcomm/ucast.a
lib/heartbeat/plugins/HBcomm/ucast.la
lib/heartbeat/plugins/HBcomm/ucast.so
lib/heartbeat/plugins/test/test.a
lib/heartbeat/plugins/test/test.la
lib/heartbeat/plugins/test/test.so
lib/heartbeat/recoverymgrd
lib/heartbeat/req_resource
lib/heartbeat/send_arp
lib/libapphb.a
lib/libapphb.la
lib/libapphb.so
lib/libapphb.so.0
lib/libccmclient.a
lib/libccmclient.la
lib/libccmclient.so
lib/libccmclient.so.0
lib/libckpt.a
lib/libckpt.la
lib/libckpt.so
lib/libckpt.so.0
lib/libclm.a
lib/libclm.la
lib/libclm.so
lib/libclm.so.0
lib/libhbclient.a
lib/libhbclient.la
lib/libhbclient.so
lib/libhbclient.so.0
lib/libpils.a
lib/libpils.la
lib/libpils.so
lib/libpils.so.0
lib/libplumb.a
lib/libplumb.la
lib/libplumb.so
lib/libplumb.so.0
lib/librecoverymgr.a
lib/librecoverymgr.la
lib/librecoverymgr.so
lib/librecoverymgr.so.0
lib/libstonith.a
lib/libstonith.la
lib/libstonith.so
lib/libstonith.so.0
lib/pils/plugins/InterfaceMgr/generic.a
lib/pils/plugins/InterfaceMgr/generic.la
lib/pils/plugins/InterfaceMgr/generic.so
lib/stonith/plugins/stonith/apcmaster.a
lib/stonith/plugins/stonith/apcmaster.la
lib/stonith/plugins/stonith/apcmaster.so
lib/stonith/plugins/stonith/apcsmart.a
lib/stonith/plugins/stonith/apcsmart.la
lib/stonith/plugins/stonith/apcsmart.so
lib/stonith/plugins/stonith/baytech.a
lib/stonith/plugins/stonith/baytech.la
lib/stonith/plugins/stonith/baytech.so
lib/stonith/plugins/stonith/external.a
lib/stonith/plugins/stonith/external.la
lib/stonith/plugins/stonith/external.so
lib/stonith/plugins/stonith/ibmhmc.a
lib/stonith/plugins/stonith/ibmhmc.la
lib/stonith/plugins/stonith/ibmhmc.so
lib/stonith/plugins/stonith/meatware.a
lib/stonith/plugins/stonith/meatware.la
lib/stonith/plugins/stonith/meatware.so
lib/stonith/plugins/stonith/null.a
lib/stonith/plugins/stonith/null.la
lib/stonith/plugins/stonith/null.so
lib/stonith/plugins/stonith/nw_rpc100s.a
lib/stonith/plugins/stonith/nw_rpc100s.la
lib/stonith/plugins/stonith/nw_rpc100s.so
lib/stonith/plugins/stonith/rcd_serial.a
lib/stonith/plugins/stonith/rcd_serial.la
lib/stonith/plugins/stonith/rcd_serial.so
lib/stonith/plugins/stonith/rps10.a
lib/stonith/plugins/stonith/rps10.la
lib/stonith/plugins/stonith/rps10.so
lib/stonith/plugins/stonith/ssh.a
lib/stonith/plugins/stonith/ssh.la
lib/stonith/plugins/stonith/ssh.so
lib/stonith/plugins/stonith/wti_nps.a
lib/stonith/plugins/stonith/wti_nps.la
lib/stonith/plugins/stonith/wti_nps.so
sbin/ldirectord
sbin/meatclient
sbin/stonith
sbin/supervise-ldirectord-config
share/doc/heartbeat-1.2.3/AUTHORS
share/doc/heartbeat-1.2.3/COPYING
share/doc/heartbeat-1.2.3/ChangeLog
share/doc/heartbeat-1.2.3/DirectoryMap.txt
share/doc/heartbeat-1.2.3/GettingStarted.html
share/doc/heartbeat-1.2.3/GettingStarted.txt
share/doc/heartbeat-1.2.3/HardwareGuide.html
share/doc/heartbeat-1.2.3/HardwareGuide.txt
share/doc/heartbeat-1.2.3/README
share/doc/heartbeat-1.2.3/Requirements.html
share/doc/heartbeat-1.2.3/Requirements.txt
share/doc/heartbeat-1.2.3/apphbd.cf
share/doc/heartbeat-1.2.3/authkeys
share/doc/heartbeat-1.2.3/faqntips.html
share/doc/heartbeat-1.2.3/faqntips.txt
share/doc/heartbeat-1.2.3/ha.cf
share/doc/heartbeat-1.2.3/haresources
share/doc/heartbeat-1.2.3/heartbeat_api.html
share/doc/heartbeat-1.2.3/heartbeat_api.txt
share/doc/heartbeat-1.2.3/rsync.html
share/doc/heartbeat-1.2.3/rsync.txt
share/doc/heartbeat-1.2.3/startstop
@dirrm share/doc/heartbeat-1.2.3
@dirrm lib/stonith/plugins/stonith
@dirrm lib/stonith/plugins
@dirrm lib/stonith
@dirrm lib/pils/plugins/InterfaceMgr
@dirrm lib/pils/plugins
@dirrm lib/pils
@dirrm lib/heartbeat/plugins/test
@dirrm lib/heartbeat/plugins/HBcomm
@dirrm lib/heartbeat/plugins/HBauth
@dirrm lib/heartbeat/plugins/AppHBNotification
@dirrm lib/heartbeat/plugins
@dirrm lib/heartbeat/cts
@dirrm lib/heartbeat
@dirrm include/stonith
@dirrm include/saf
@dirrm include/pils
@dirrm include/ocf
@dirrm include/heartbeat
@dirrm include/clplumbing
@dirrm etc/ha.d/resource.d
@dirrm etc/ha.d/rc.d
@unexec rmdir %D/etc/ha.d/conf 2>/dev/null || true
@unexec rmdir %D/etc/ha.d 2>/dev/null || true
@cwd /
@unexec rmdir %D/var/lib/heartbeat/ckpt 2>/dev/null || true
@unexec rmdir %D/var/lib/heartbeat/ccm 2>/dev/null || true
@unexec rmdir %D/var/lib/heartbeat 2>/dev/null || true

View File

@ -0,0 +1,45 @@
# New ports collection makefile for: hearbeat
# Date created: 18 March 2005
# Whom: Scott Kleihege <scott-ports@tummy.com>
#
# $FreeBSD$
#
PORTNAME= heartbeat
PORTVERSION= 1.2.3
CATEGORIES= sysutils
MASTER_SITES= http://linux-ha.org/download/
MAINTAINER= scott-ports@tummy.com
COMMENT= Subsystem for High-Availability Clustering
BUILD_DEPENDS= ${LOCALBASE}/include/libnet.h:${PORTSDIR}/net/libnet-devel
USE_PERL5= yes
USE_GMAKE= yes
USE_GNOME= glib12
INSTALLS_SHLIB= yes
GNU_CONFIGURE= yes
USE_INC_LIBTOOL_VER= 13
USE_REINPLACE= yes
CONFIGURE_ARGS= --disable-fatal-warnings
SUB_FILES= pkg-install
PKGDEINSTALL= ${PKGINSTALL}
MAN1= cl_status.1
MAN8= apphbd.8 heartbeat.8 ldirectord.8 meatclient.8 \
stonith.8 supervise-ldirectord-config.8
post-patch:
${REINPLACE_CMD} -e "s#logrotate.d##" ${WRKSRC}/heartbeat/Makefile.in \
${WRKSRC}/ldirectord/Makefile.in
post-deinstall:
@${SH} ${PKGINSTALL} ${PKGNAME} DEINSTALL
post-install:
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
MD5 (heartbeat-1.2.3.tar.gz) = 9fd126e5dff51cc8c1eee223c252a4af
SIZE (heartbeat-1.2.3.tar.gz) = 1772513

View File

@ -0,0 +1,174 @@
#! /bin/sh
base=%%PREFIX%%
ask() {
local question default answer
question=$1
default=$2
if [ -z "${PACKAGE_BUILDING}" ]; then
read -p "${question} [${default}]? " answer
fi
if [ x${answer} = x ]; then
answer=${default}
fi
echo ${answer}
}
yesno() {
local dflt question answer
question=$1
dflt=$2
while :; do
answer=$(ask "${question}" "${dflt}")
case "${answer}" in
[Yy]*) return 0;;
[Nn]*) return 1;;
esac
echo "Please answer yes or no."
done
}
make_account() {
local u g gcos homeopt home
u=$1
g=$2
gcos=$3
homeopt=${4:+"-d $4"}
if pw group show "${g}" >/dev/null 2>&1; then
echo "You already have a group \"${g}\", so I will use it."
else
echo "You need a group \"${g}\"."
if which -s pw && yesno "Would you like me to create it" y; then
pw groupadd ${g} || exit
echo "Done."
else
echo "Please create it, and try again."
if ! grep -q "^${u}:" /etc/passwd; then
echo "While you're at it, please create a user \"${u}\" too,"
echo "with a default group of \"${g}\"."
fi
exit 1
fi
fi
if pw user show "${u}" >/dev/null 2>&1; then
echo "You already have a user \"${u}\", so I will use it."
else
echo "You need a user \"${u}\"."
if which -s pw && yesno "Would you like me to create it" y; then
pw useradd ${u} -g ${g} -h - ${homeopt} \
-s /nonexistent -c "${gcos}" || exit
echo "Done."
else
echo "Please create it, and try again."
exit 1
fi
fi
if [ x"$homeopt" = x ]; then
eval home=~${u}
if [ ! -d "${home}" ]; then
if yesno \
"Would you like me to create ${u}'s home directory (${home})" y
then
mkdir -p ${home} || exit
chown -R ${u}:${g} ${home} || exit
chmod -R go= ${home} || exit
else
echo "Please create it, and try again."
exit 1
fi
fi
fi
}
delete_account() {
local u g home
u=$1
g=$2
if yesno "Do you want me to remove group \"${g}\"" y; then
pw groupdel -n ${g}
echo "Done."
fi
if yesno "Do you want me to remove user \"${u}\"" y; then
eval home=~${u}
pw userdel -n ${u}
echo "Done."
if [ -d "${home}" ]; then
echo "Please remember to remove the home directory \"${home}\" as"
echo "well as the mirrored files."
fi
fi
}
case $2 in
POST-INSTALL)
if which -s pw && which -s lockf; then
:
else
cat <<EOF
This system looks like a pre-2.2 version of FreeBSD. I see that it
is missing the "lockf" and/or "pw" utilities. I need these utilities.
Please get them and install them, and try again. You can get the
sources from:
ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.bin/lockf.tar.gz
ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.sbin/pw.tar.gz
EOF
exit 1
fi
echo ""
user=hacluster
group=haclient
make_account ${user} ${group} "${user} ${group}" "/nonexistent"
echo "Adding empty dirs and pid file."
test -d /var/lib/heartbeat/ckpt || \
install -d -m 755 /var/lib/heartbeat/ckpt
test -d /var/lib/heartbeat/ccm || \
install -d -m 755 /var/lib/heartbeat/ccm
test -d /var/lock/subsys || \
install -d -m 755 /var/lock/subsys
test -d ${base}/etc/ha.d/conf || \
install -d -m 755 ${base}/etc/ha.d/conf
test -f /var/run/heartbeat.pid || \
install -m 644 -o ${user} -g ${group} /dev/null \
/var/run/heartbeat.pid
;;
DEINSTALL)
if ps -axc | grep -q heartbeat; then
if yesno "There are some heartbeat processes running. Shall I kill them" y
then
killall heartbeat
sleep 2
else
echo "OK ... I hope you know what you are doing."
fi
fi
delete_account hacluster haclient
echo "Removing runtime files"
if [ -d /var/lib/heartbeat ]; then
rm -r /var/lib/heartbeat
fi
if [ -f /var/lock/subsys/heartbeat ]; then
rm /var/lock/subsys/heartbeat
fi
if [ -f /var/run/heartbeat.pid ]; then
rm /var/run/heartbeat.pid
fi
;;
esac

View File

@ -0,0 +1,24 @@
heartbeat is a basic high-availability subsystem. It will run
scripts at initialization, and when machines go up or down. This
version will also perform IP address takeover using gratuitous ARPs.
It implements the following kinds of heartbeats:
- Bidirectional Serial Rings ("raw" serial ports)
- UDP/IP broadcast (ethernet, etc)
- Unicast heartbeats
- "ping" heartbeats (for routers, switches, etc.)
(to be used for breaking ties in 2-node systems)
ldirectord is a stand-alone daemon to monitor services.
The STONITH module (a.k.a. STOMITH) provides an extensible interface
for remotely powering down a node in the cluster.
PILS is an generalized and portable open source Plugin and Interface
Loading System. PILS manages both plugins (loadable objects), and
the interfaces these plugins implement. PILS is designed to support
any number of plugins implementing any number of interfaces.
WWW: http://linux-ha.org/
Scott Kleihege <scott-ports@tummy.com>

View File

@ -0,0 +1,269 @@
bin/cl_status
etc/ha.d/README.config
etc/ha.d/harc
etc/ha.d/rc.d/ask_resources
etc/ha.d/rc.d/hb_takeover
etc/ha.d/rc.d/ip-request
etc/ha.d/rc.d/ip-request-resp
etc/ha.d/rc.d/status
etc/ha.d/resource.d/AudibleAlarm
etc/ha.d/resource.d/Delay
etc/ha.d/resource.d/Filesystem
etc/ha.d/resource.d/ICP
etc/ha.d/resource.d/IPaddr
etc/ha.d/resource.d/IPaddr2
etc/ha.d/resource.d/IPsrcaddr
etc/ha.d/resource.d/LVM
etc/ha.d/resource.d/LinuxSCSI
etc/ha.d/resource.d/MailTo
etc/ha.d/resource.d/OCF
etc/ha.d/resource.d/Raid1
etc/ha.d/resource.d/SendArp
etc/ha.d/resource.d/ServeRAID
etc/ha.d/resource.d/WAS
etc/ha.d/resource.d/WinPopup
etc/ha.d/resource.d/Xinetd
etc/ha.d/resource.d/apache
etc/ha.d/resource.d/db2
etc/ha.d/resource.d/portblock
etc/ha.d/shellfuncs
etc/rc.d/heartbeat.sh
etc/rc.d/ldirectord.sh
include/clplumbing/GSource.h
include/clplumbing/Gmain_timeout.h
include/clplumbing/apphb_cs.h
include/clplumbing/base64.h
include/clplumbing/cl_log.h
include/clplumbing/cl_malloc.h
include/clplumbing/cl_poll.h
include/clplumbing/cl_signal.h
include/clplumbing/cpulimits.h
include/clplumbing/ipc.h
include/clplumbing/loggingdaemon.h
include/clplumbing/longclock.h
include/clplumbing/lsb_exitcodes.h
include/clplumbing/mkstemp_mode.h
include/clplumbing/netstring.h
include/clplumbing/proctrack.h
include/clplumbing/realtime.h
include/clplumbing/recoverymgr_cs.h
include/clplumbing/timers.h
include/clplumbing/ttylock.h
include/clplumbing/uids.h
include/heartbeat/HBauth.h
include/heartbeat/HBcomm.h
include/heartbeat/apphb.h
include/heartbeat/apphb_notify.h
include/heartbeat/ha_config.h
include/heartbeat/ha_msg.h
include/heartbeat/hb_api.h
include/heartbeat/heartbeat.h
include/heartbeat/recoverymgr.h
include/ocf/oc_event.h
include/ocf/oc_membership.h
include/pils/generic.h
include/pils/interface.h
include/pils/plugin.h
include/saf/ais.h
include/saf/ais_amf.h
include/saf/ais_base.h
include/saf/ais_checkpoint.h
include/saf/ais_event.h
include/saf/ais_lock.h
include/saf/ais_membership.h
include/saf/ais_message.h
include/stonith/expect.h
include/stonith/stonith.h
lib/heartbeat/BasicSanityCheck
lib/heartbeat/ResourceManager
lib/heartbeat/TestHeartbeatComm
lib/heartbeat/api_test
lib/heartbeat/apphbd
lib/heartbeat/apphbtest
lib/heartbeat/ccm
lib/heartbeat/ccm_testclient
lib/heartbeat/checkpointd
lib/heartbeat/ckpttest
lib/heartbeat/clmtest
lib/heartbeat/cts/CM_fs.py
lib/heartbeat/cts/CM_hb.py
lib/heartbeat/cts/CTS.py
lib/heartbeat/cts/CTSaudits.py
lib/heartbeat/cts/CTSlab.py
lib/heartbeat/cts/CTStests.py
lib/heartbeat/cts/README
lib/heartbeat/findif
lib/heartbeat/ha_config
lib/heartbeat/hb_standby
lib/heartbeat/hb_takeover
lib/heartbeat/heartbeat
lib/heartbeat/ipctest
lib/heartbeat/ipctransientclient
lib/heartbeat/ipctransientserver
lib/heartbeat/ipfail
lib/heartbeat/mach_down
lib/heartbeat/plugins/AppHBNotification/recmgr.a
lib/heartbeat/plugins/AppHBNotification/recmgr.la
lib/heartbeat/plugins/AppHBNotification/recmgr.so
lib/heartbeat/plugins/HBauth/crc.a
lib/heartbeat/plugins/HBauth/crc.la
lib/heartbeat/plugins/HBauth/crc.so
lib/heartbeat/plugins/HBauth/md5.a
lib/heartbeat/plugins/HBauth/md5.la
lib/heartbeat/plugins/HBauth/md5.so
lib/heartbeat/plugins/HBauth/sha1.a
lib/heartbeat/plugins/HBauth/sha1.la
lib/heartbeat/plugins/HBauth/sha1.so
lib/heartbeat/plugins/HBcomm/bcast.a
lib/heartbeat/plugins/HBcomm/bcast.la
lib/heartbeat/plugins/HBcomm/bcast.so
lib/heartbeat/plugins/HBcomm/mcast.a
lib/heartbeat/plugins/HBcomm/mcast.la
lib/heartbeat/plugins/HBcomm/mcast.so
lib/heartbeat/plugins/HBcomm/ping.a
lib/heartbeat/plugins/HBcomm/ping.la
lib/heartbeat/plugins/HBcomm/ping.so
lib/heartbeat/plugins/HBcomm/ping_group.a
lib/heartbeat/plugins/HBcomm/ping_group.la
lib/heartbeat/plugins/HBcomm/ping_group.so
lib/heartbeat/plugins/HBcomm/serial.a
lib/heartbeat/plugins/HBcomm/serial.la
lib/heartbeat/plugins/HBcomm/serial.so
lib/heartbeat/plugins/HBcomm/ucast.a
lib/heartbeat/plugins/HBcomm/ucast.la
lib/heartbeat/plugins/HBcomm/ucast.so
lib/heartbeat/plugins/test/test.a
lib/heartbeat/plugins/test/test.la
lib/heartbeat/plugins/test/test.so
lib/heartbeat/recoverymgrd
lib/heartbeat/req_resource
lib/heartbeat/send_arp
lib/libapphb.a
lib/libapphb.la
lib/libapphb.so
lib/libapphb.so.0
lib/libccmclient.a
lib/libccmclient.la
lib/libccmclient.so
lib/libccmclient.so.0
lib/libckpt.a
lib/libckpt.la
lib/libckpt.so
lib/libckpt.so.0
lib/libclm.a
lib/libclm.la
lib/libclm.so
lib/libclm.so.0
lib/libhbclient.a
lib/libhbclient.la
lib/libhbclient.so
lib/libhbclient.so.0
lib/libpils.a
lib/libpils.la
lib/libpils.so
lib/libpils.so.0
lib/libplumb.a
lib/libplumb.la
lib/libplumb.so
lib/libplumb.so.0
lib/librecoverymgr.a
lib/librecoverymgr.la
lib/librecoverymgr.so
lib/librecoverymgr.so.0
lib/libstonith.a
lib/libstonith.la
lib/libstonith.so
lib/libstonith.so.0
lib/pils/plugins/InterfaceMgr/generic.a
lib/pils/plugins/InterfaceMgr/generic.la
lib/pils/plugins/InterfaceMgr/generic.so
lib/stonith/plugins/stonith/apcmaster.a
lib/stonith/plugins/stonith/apcmaster.la
lib/stonith/plugins/stonith/apcmaster.so
lib/stonith/plugins/stonith/apcsmart.a
lib/stonith/plugins/stonith/apcsmart.la
lib/stonith/plugins/stonith/apcsmart.so
lib/stonith/plugins/stonith/baytech.a
lib/stonith/plugins/stonith/baytech.la
lib/stonith/plugins/stonith/baytech.so
lib/stonith/plugins/stonith/external.a
lib/stonith/plugins/stonith/external.la
lib/stonith/plugins/stonith/external.so
lib/stonith/plugins/stonith/ibmhmc.a
lib/stonith/plugins/stonith/ibmhmc.la
lib/stonith/plugins/stonith/ibmhmc.so
lib/stonith/plugins/stonith/meatware.a
lib/stonith/plugins/stonith/meatware.la
lib/stonith/plugins/stonith/meatware.so
lib/stonith/plugins/stonith/null.a
lib/stonith/plugins/stonith/null.la
lib/stonith/plugins/stonith/null.so
lib/stonith/plugins/stonith/nw_rpc100s.a
lib/stonith/plugins/stonith/nw_rpc100s.la
lib/stonith/plugins/stonith/nw_rpc100s.so
lib/stonith/plugins/stonith/rcd_serial.a
lib/stonith/plugins/stonith/rcd_serial.la
lib/stonith/plugins/stonith/rcd_serial.so
lib/stonith/plugins/stonith/rps10.a
lib/stonith/plugins/stonith/rps10.la
lib/stonith/plugins/stonith/rps10.so
lib/stonith/plugins/stonith/ssh.a
lib/stonith/plugins/stonith/ssh.la
lib/stonith/plugins/stonith/ssh.so
lib/stonith/plugins/stonith/wti_nps.a
lib/stonith/plugins/stonith/wti_nps.la
lib/stonith/plugins/stonith/wti_nps.so
sbin/ldirectord
sbin/meatclient
sbin/stonith
sbin/supervise-ldirectord-config
share/doc/heartbeat-1.2.3/AUTHORS
share/doc/heartbeat-1.2.3/COPYING
share/doc/heartbeat-1.2.3/ChangeLog
share/doc/heartbeat-1.2.3/DirectoryMap.txt
share/doc/heartbeat-1.2.3/GettingStarted.html
share/doc/heartbeat-1.2.3/GettingStarted.txt
share/doc/heartbeat-1.2.3/HardwareGuide.html
share/doc/heartbeat-1.2.3/HardwareGuide.txt
share/doc/heartbeat-1.2.3/README
share/doc/heartbeat-1.2.3/Requirements.html
share/doc/heartbeat-1.2.3/Requirements.txt
share/doc/heartbeat-1.2.3/apphbd.cf
share/doc/heartbeat-1.2.3/authkeys
share/doc/heartbeat-1.2.3/faqntips.html
share/doc/heartbeat-1.2.3/faqntips.txt
share/doc/heartbeat-1.2.3/ha.cf
share/doc/heartbeat-1.2.3/haresources
share/doc/heartbeat-1.2.3/heartbeat_api.html
share/doc/heartbeat-1.2.3/heartbeat_api.txt
share/doc/heartbeat-1.2.3/rsync.html
share/doc/heartbeat-1.2.3/rsync.txt
share/doc/heartbeat-1.2.3/startstop
@dirrm share/doc/heartbeat-1.2.3
@dirrm lib/stonith/plugins/stonith
@dirrm lib/stonith/plugins
@dirrm lib/stonith
@dirrm lib/pils/plugins/InterfaceMgr
@dirrm lib/pils/plugins
@dirrm lib/pils
@dirrm lib/heartbeat/plugins/test
@dirrm lib/heartbeat/plugins/HBcomm
@dirrm lib/heartbeat/plugins/HBauth
@dirrm lib/heartbeat/plugins/AppHBNotification
@dirrm lib/heartbeat/plugins
@dirrm lib/heartbeat/cts
@dirrm lib/heartbeat
@dirrm include/stonith
@dirrm include/saf
@dirrm include/pils
@dirrm include/ocf
@dirrm include/heartbeat
@dirrm include/clplumbing
@dirrm etc/ha.d/resource.d
@dirrm etc/ha.d/rc.d
@unexec rmdir %D/etc/ha.d/conf 2>/dev/null || true
@unexec rmdir %D/etc/ha.d 2>/dev/null || true
@cwd /
@unexec rmdir %D/var/lib/heartbeat/ckpt 2>/dev/null || true
@unexec rmdir %D/var/lib/heartbeat/ccm 2>/dev/null || true
@unexec rmdir %D/var/lib/heartbeat 2>/dev/null || true