1 Summary: Heartbeat - subsystem for High-Availability Linux
2 Summary(pl): Podsystem heartbeat dla systemów o podwy¿szonej niezawodno¶ci
7 Group: Applications/System
8 Source0: http://linux-ha.org/download/%{name}-%{version}.tar.gz
9 Patch0: %{name}.dirty.time.h.patch
10 Patch1: %{name}-remove_groupadd_and_chgrp.patch
11 Patch2: %{name}-manpath.patch
12 # SuSE-specific; transformation unfinished
13 Patch3: %{name}-init.patch
14 URL: http://linux-ha.org/
15 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 Requires(pre): /sbin/chkconfig
18 Requires(pre): /usr/bin/getgid
19 Requires(pre): /usr/sbin/groupadd
20 Requires(post): /usr/sbin/groupdel
21 Requires: syslogdaemon
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
72 if [ ! -d $TEMPL ]; then
75 install rc.config.heartbeat $TEMPL
77 rm -f doc/{*.html,*.8,COPYING,Makefile*}
80 %defattr(644,root,root,755)
82 # needs fixing - don't use defattr(-)!!!
84 %dir %{_sysconfdir}/ha.d
85 %attr (755,root,root) %{_sysconfdir}/ha.d/harc
86 %{_sysconfdir}/ha.d/shellfuncs
87 %{_sysconfdir}/ha.d/rc.d
88 %{_sysconfdir}/ha.d/README.config
89 %{_sysconfdir}/ha.d/conf
91 # this is probably not the best location for binaries...
93 %{_libdir}/libhbclient.so
94 %{_libdir}/libhbclient.a
95 %{_sysconfdir}/ha.d/resource.d/
96 %{_sysconfdir}/rc.d/init.d/heartbeat
97 %{_sysconfdir}/logrotate.d/heartbeat
98 /var/adm/fillup-templates/rc.config.heartbeat
99 %dir /var/lib/heartbeat
100 %attr (600, root, root) /var/lib/heartbeat/fifo
101 %attr (750, root, haclient) /var/lib/heartbeat/api
102 %attr (620, root, haclient) /var/lib/heartbeat/register
103 %attr (1770, root, haclient) /var/lib/heartbeat/casual
104 %{_mandir}/man8/heartbeat.8*
107 rm -rf $RPM_BUILD_ROOT
110 if [ -n "`/usr/bin/getgid haclient`" ]; then
111 if [ "`/usr/bin/getgid haclient`" != "60" ]; then
112 echo "Error: group haclient doesn't have gid=60. Correct this before installing heartbeat." 1>&2
116 /usr/sbin/groupadd -g 60 -r haclient
120 /sbin/chkconfig --add heartbeat
123 Uninstall_PPP_hack() {
124 file2hack=etc/ppp/ip-up.local
125 echo "NOTE: Restoring /$file2hack"
127 ed -s $file2hack <<-!EOF 2>/dev/null
134 if [ "$1" = "0" ]; then
135 /sbin/chkconfig --del heartbeat
136 if [ ! -x etc/ppp/ip-up.heart ]; then
142 if [ "$1" = "0" ]; then
143 /usr/sbin/groupdel haclient 2>/dev/null