1 Summary: Heartbeat - subsystem for High-Availability Linux
2 Summary(es): Subsistema heartbeat para Linux "High-Availability"
3 Summary(pl): Podsystem heartbeat dla systemów o podwy¿szonej niezawodno¶ci
4 Summary(pt_BR): Implementa sistema de monitoração (heartbeats) visando Alta Disponibilidade
9 Group: Applications/System
10 Source0: http://linux-ha.org/download/%{name}-%{version}.tar.gz
11 Patch0: %{name}.dirty.time.h.patch
12 Patch1: %{name}-remove_groupadd_and_chgrp.patch
13 Patch2: %{name}-manpath.patch
14 # SuSE-specific; transformation unfinished
15 Patch3: %{name}-init.patch
16 URL: http://linux-ha.org/
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 Requires(pre): /sbin/chkconfig
20 Requires(pre): /usr/bin/getgid
21 Requires(pre): /usr/sbin/groupadd
22 Requires(post): /usr/sbin/groupdel
23 Requires: syslogdaemon
26 heartbeat is a basic heartbeat subsystem for Linux-HA. It will run
27 scripts at initialization, and when machines go up or down. This
28 version will also perform IP address takeover using gratuitous ARPs.
29 It works correctly for a 2-node configuration, and is extensible to
30 larger configurations.
32 It implements the following kinds of heartbeats:
33 - Bidirectional Serial Rings ("raw" serial ports)
36 heartbeat es un sistema básico para Linux-HA. La función de este
37 software es ejecutar scripts en la inicialización y al apagar las
38 máquinas que lo utilizan.
41 heartbeat jest podstawowym podsystemem dla systemów o podwy¿szonej
42 dostêpno¶ci budowanych w oparciu o Linuksa. Zajmuje siê uruchamianiem
43 skryptów podczas startu i zamykania systemu. Ta wersja pakietu pozwala
44 na przejmowanie adresów IP. Oprogramowanie dzia³a poprawnie dla
45 konfiguracji sk³adaj±cej siê z 2 hostów, mo¿na je równie¿ stosowaæ do
46 bardziej skomplikowanych konfiguracji.
49 #Summary: Provides an interface to Shoot The Other Node In The Head
61 sed -e 's/MAKE=gmake/MAKE=make/g' < Makefile > aqq
64 sed -e 's/lynx/links/' > aqq < Makefile
70 rm -rf $RPM_BUILD_ROOT
71 RPM_BUILD=yes BUILD_ROOT=$RPM_BUILD_ROOT %{__make} install
73 cd $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d
75 ln -sf %{_sbindir}/ldirectord ldirectord
78 TEMPL=$RPM_BUILD_ROOT/var/adm/fillup-templates
79 if [ ! -d $TEMPL ]; then
82 install rc.config.heartbeat $TEMPL
84 rm -f doc/{*.html,*.8,COPYING,Makefile*}
87 %defattr(644,root,root,755)
89 # needs fixing - don't use defattr(-)!!!
91 %dir %{_sysconfdir}/ha.d
92 %attr (755,root,root) %{_sysconfdir}/ha.d/harc
93 %{_sysconfdir}/ha.d/shellfuncs
94 %{_sysconfdir}/ha.d/rc.d
95 %{_sysconfdir}/ha.d/README.config
96 %{_sysconfdir}/ha.d/conf
98 # this is probably not the best location for binaries...
100 %{_libdir}/libhbclient.so
101 %{_libdir}/libhbclient.a
102 %{_sysconfdir}/ha.d/resource.d/
103 %{_sysconfdir}/rc.d/init.d/heartbeat
104 %{_sysconfdir}/logrotate.d/heartbeat
105 /var/adm/fillup-templates/rc.config.heartbeat
106 %dir /var/lib/heartbeat
107 %attr (600, root, root) /var/lib/heartbeat/fifo
108 %attr (750, root, haclient) /var/lib/heartbeat/api
109 %attr (620, root, haclient) /var/lib/heartbeat/register
110 %attr (1770, root, haclient) /var/lib/heartbeat/casual
111 %{_mandir}/man8/heartbeat.8*
114 rm -rf $RPM_BUILD_ROOT
117 if [ -n "`/usr/bin/getgid haclient`" ]; then
118 if [ "`/usr/bin/getgid haclient`" != "60" ]; then
119 echo "Error: group haclient doesn't have gid=60. Correct this before installing heartbeat." 1>&2
123 /usr/sbin/groupadd -g 60 -r haclient
127 /sbin/chkconfig --add heartbeat
130 Uninstall_PPP_hack() {
131 file2hack=etc/ppp/ip-up.local
132 echo "NOTE: Restoring /$file2hack"
134 ed -s $file2hack <<-!EOF 2>/dev/null
141 if [ "$1" = "0" ]; then
142 /sbin/chkconfig --del heartbeat
143 if [ ! -x etc/ppp/ip-up.heart ]; then
149 if [ "$1" = "0" ]; then
150 /usr/sbin/groupdel haclient 2>/dev/null