1 Summary: Heartbeat - subsystem for High-Availability Linux
2 Summary(pl): Podsystem heartbeat dla systemów o podwy¿szonej niezawodno¶ci
7 URL: http://linux-ha.org/
8 Group: Applications/System
9 Source0: http://linux-ha.org/download/%{name}-%{version}.tar.gz
10 Patch0: %{name}.dirty.time.h.patch
11 Patch1: %{name}-remove_groupadd_and_chgrp.patch
12 Patch2: %{name}-manpath.patch
13 # SuSE-specific; transformation unfinished
14 Patch3: %{name}-init.patch
15 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 Requires: syslogdaemon
18 Requires(pre): /sbin/chkconfig
19 Requires(pre): /usr/bin/getgid
20 Requires(pre): /usr/sbin/groupadd
21 Requires(post): /usr/sbin/groupdel
24 heartbeat is a basic heartbeat subsystem for Linux-HA. It will run
25 scripts at initialization, and when machines go up or down. This
26 version will also perform IP address takeover using gratuitous ARPs.
27 It works correctly for a 2-node configuration, and is extensible to
28 larger configurations.
30 It implements the following kinds of heartbeats:
31 - Bidirectional Serial Rings ("raw" serial ports)
34 heartbeat jest podstawowym podsystemem dla systemów o podwy¿szonej
35 dostêpno¶ci budowanych w oparciu o Linuksa. Zajmuje siê uruchamianiem
36 skryptów podczas startu i zamykania systemu. Ta wersja pakietu pozwala
37 na przejmowanie adresów IP. Oprogramowanie dzia³a poprawnie dla
38 konfiguracji sk³adaj±cej siê z 2 hostów, mo¿na je równie¿ stosowaæ do
39 bardziej skomplikowanych konfiguracji.
42 #Summary: Provides an interface to Shoot The Other Node In The Head
54 sed -e 's/MAKE=gmake/MAKE=make/g' < Makefile > aqq
57 sed -e 's/lynx/links/' > aqq < Makefile
63 rm -rf $RPM_BUILD_ROOT
64 RPM_BUILD=yes BUILD_ROOT=$RPM_BUILD_ROOT %{__make} install
66 cd $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d
68 ln -sf %{_sbindir}/ldirectord ldirectord
71 TEMPL=$RPM_BUILD_ROOT/var/adm/fillup-templates
77 install rc.config.heartbeat $TEMPL
79 rm -f doc/{*.html,*.8,COPYING,Makefile*}
83 %defattr(644,root,root,755)
85 %dir %{_sysconfdir}/ha.d
86 %attr (755,root,root) %{_sysconfdir}/ha.d/harc
87 %{_sysconfdir}/ha.d/shellfuncs
88 %{_sysconfdir}/ha.d/rc.d
89 %{_sysconfdir}/ha.d/README.config
90 %{_sysconfdir}/ha.d/conf
92 # this is probably not the best location for binaries...
94 %{_libdir}/libhbclient.so
95 %{_libdir}/libhbclient.a
96 %{_sysconfdir}/ha.d/resource.d/
97 %{_sysconfdir}/rc.d/init.d/heartbeat
98 %{_sysconfdir}/logrotate.d/heartbeat
99 /var/adm/fillup-templates/rc.config.heartbeat
100 %dir /var/lib/heartbeat
101 %attr (600, root, root) /var/lib/heartbeat/fifo
102 %attr (750, root, haclient) /var/lib/heartbeat/api
103 %attr (620, root, haclient) /var/lib/heartbeat/register
104 %attr (1770, root, haclient) /var/lib/heartbeat/casual
105 %{_mandir}/man8/heartbeat.8*
109 rm -rf $RPM_BUILD_ROOT
112 if [ -n "`/usr/bin/getgid haclient`" ]; then
113 if [ "`/usr/bin/getgid haclient`" != "60" ]; then
114 echo "Warning: group haclient haven't gid=60. Correct this before installing heartbeat" 1>&2
118 /usr/sbin/groupadd -g 60 -r haclient
122 /sbin/chkconfig --add heartbeat
125 Uninstall_PPP_hack() {
126 file2hack=etc/ppp/ip-up.local
127 echo "NOTE: Restoring /$file2hack"
129 ed -s $file2hack <<-!EOF 2>/dev/null
136 if [ "$1" = "0" ]; then
137 /sbin/chkconfig --del heartbeat
138 if [ ! -x etc/ppp/ip-up.heart ]; then
144 if [ "$1" = "0" ]; then
145 /usr/sbin/groupdel haclient 2>/dev/null